af-mobile-client-vue3 1.1.8 → 1.1.9
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/.env +6 -6
- package/.env.development +4 -4
- package/.env.envoiceShow +6 -6
- package/.env.production +6 -6
- package/.husky/commit-msg +1 -1
- package/.husky/pre-commit +1 -1
- package/.vscode/settings.json +61 -61
- package/mock/modules/user.mock.ts +152 -152
- package/package.json +1 -1
- package/public/favicon.svg +4 -4
- package/public/safari-pinned-tab.svg +32 -32
- package/scripts/verifyCommit.js +19 -19
- package/src/App.vue +43 -43
- package/src/api/user/index.ts +40 -40
- package/src/bootstrap.ts +18 -18
- package/src/components/core/NavBar/index.vue +12 -12
- package/src/components/core/Tabbar/index.vue +38 -38
- package/src/components/core/XGridDropOption/index.vue +151 -151
- package/src/components/core/XMultiSelect/index.vue +183 -183
- package/src/components/data/XCellDetail/index.vue +106 -106
- package/src/components/data/XFormItem/index.vue +26 -7
- package/src/components/data/XOlMap/XLocationPicker/index.vue +7 -9
- package/src/components/data/XOlMap/index.vue +103 -96
- package/src/components/data/XOlMap/utils/wgs84ToGcj02.js +154 -154
- package/src/components/data/XReportForm/XReportFormJsonRender.vue +220 -220
- package/src/components/data/XReportForm/index.vue +1079 -1079
- package/src/components/data/XReportGrid/XAddReport/index.ts +1 -1
- package/src/components/data/XReportGrid/XReportDrawer/index.ts +1 -1
- package/src/components/data/XSignature/index.vue +285 -285
- package/src/components/data/XTag/index.vue +10 -10
- package/src/components/layout/NormalDataLayout/index.vue +70 -70
- package/src/components/layout/TabBarLayout/index.vue +40 -40
- package/src/components.d.ts +53 -53
- package/src/env.d.ts +16 -16
- package/src/font-style/font.css +3 -3
- package/src/hooks/useCommon.ts +9 -9
- package/src/locales/en-US.json +25 -25
- package/src/locales/zh-CN.json +25 -25
- package/src/plugins/AppData.ts +38 -38
- package/src/router/guards.ts +59 -59
- package/src/router/index.ts +61 -61
- package/src/router/invoiceRoutes.ts +33 -33
- package/src/services/api/common.ts +109 -109
- package/src/services/api/manage.ts +8 -8
- package/src/services/api/search.ts +16 -16
- package/src/services/restTools.ts +56 -56
- package/src/services/v3Api.ts +11 -11
- package/src/stores/modules/setting.ts +52 -52
- package/src/stores/mutation-type.ts +7 -7
- package/src/utils/authority-utils.ts +84 -84
- package/src/utils/crypto.ts +39 -39
- package/src/utils/i18n.ts +41 -41
- package/src/utils/indexedDB.ts +180 -180
- package/src/utils/mobileUtil.ts +26 -26
- package/src/utils/routerUtil.ts +271 -271
- package/src/utils/runEvalFunction.ts +13 -13
- package/src/utils/wechatUtil.ts +9 -9
- package/src/views/common/LoadError.vue +64 -64
- package/src/views/common/NotFound.vue +68 -68
- package/src/views/component/EvaluateRecordView/index.vue +40 -40
- package/src/views/component/XCellDetailView/index.vue +217 -217
- package/src/views/component/XCellListView/index.vue +3 -88
- package/src/views/component/XFormGroupView/index.vue +0 -37
- package/src/views/component/XFormView/index.vue +30 -119
- package/src/views/component/XFormView/oldindex.vue +50 -0
- package/src/views/component/XOlMapView/XLocationPicker/index.vue +118 -120
- package/src/views/component/XOlMapView/index.vue +3 -5
- package/src/views/component/XReportFormIframeView/index.vue +47 -47
- package/src/views/component/XReportFormView/index.vue +13 -13
- package/src/views/component/XSignatureView/index.vue +50 -50
- package/src/views/component/menu.vue +117 -117
- package/src/views/component/notice.vue +46 -46
- package/src/views/component/topNav.vue +36 -36
- package/src/views/invoiceShow/index.vue +61 -61
- package/src/views/user/login/ForgetPasswordForm.vue +94 -94
- package/src/views/user/login/LoginTitle.vue +68 -68
- package/src/views/user/login/index.vue +22 -22
- package/src/views/user/my/index.vue +230 -230
- package/src/vue-router.d.ts +9 -9
- package/tsconfig.json +43 -43
|
@@ -1,133 +1,44 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import
|
|
2
|
+
import XFormGroup from '@af-mobile-client-vue3/components/data/XFormGroup/index.vue'
|
|
3
3
|
import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const id = ref(-1)
|
|
17
|
-
const openid = ref('')
|
|
18
|
-
const instance = getCurrentInstance()
|
|
19
|
-
const xFormInit = ref(false)
|
|
20
|
-
const route = useRoute()
|
|
21
|
-
const configName = route.query.configName as string
|
|
22
|
-
const serviceName = route.query.serviceName as string
|
|
23
|
-
const mode = route.query.mode as string
|
|
24
|
-
const updateData = ref({})
|
|
25
|
-
const title = ref('')
|
|
26
|
-
const groupFormItems = ref({})
|
|
27
|
-
const api = ref('/af-system/logic/commonQuery')
|
|
28
|
-
const updateId = {
|
|
29
|
-
queryParamsName: 'crud_oper_log_manage',
|
|
30
|
-
pageNo: 1,
|
|
31
|
-
pageSize: 20,
|
|
32
|
-
conditionParams: { o_id: route.params.id as string },
|
|
33
|
-
}
|
|
34
|
-
const loadUpdate = ref(false)
|
|
35
|
-
// const serviceName = ref('af-revenue')
|
|
36
|
-
const _currentEvaluate = {
|
|
37
|
-
id: null,
|
|
38
|
-
f_business_name: '',
|
|
39
|
-
f_evaluate_state: '',
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// 组件挂载前获取数据
|
|
43
|
-
onBeforeMount(async () => {
|
|
44
|
-
if (instance) {
|
|
45
|
-
id.value = route.params.id as unknown as number
|
|
46
|
-
openid.value = route.params.openid as string
|
|
47
|
-
formInit()
|
|
48
|
-
}
|
|
4
|
+
import { ref } from 'vue'
|
|
5
|
+
|
|
6
|
+
const configName = ref('PointBindingForm')
|
|
7
|
+
const serviceName = ref('af-linepatrol')
|
|
8
|
+
|
|
9
|
+
const formData = ref({
|
|
10
|
+
t1_f_number: '点位编号>>',
|
|
11
|
+
t2_f_name: '所属区域>>',
|
|
12
|
+
t1_f_address: '地址信息>>',
|
|
13
|
+
t1_f_address_lon_lat: '118.842054,39.246094',
|
|
14
|
+
t1_f_describe: '点位描述>>',
|
|
15
|
+
t1_f_state: '点位状态>>',
|
|
49
16
|
})
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
title.value = result.title
|
|
56
|
-
if (mode === '修改')
|
|
57
|
-
getUpdateData()
|
|
58
|
-
xFormInit.value = true
|
|
59
|
-
}, serviceName)
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
// 获取配置信息
|
|
63
|
-
function queryData() {
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// 提交操作
|
|
68
|
-
function onSubmit(params) {
|
|
69
|
-
// const data = {
|
|
70
|
-
// id: currentEvaluate.id,
|
|
71
|
-
// f_json: params,
|
|
72
|
-
// f_evaluate_date: formatDate(new Date()),
|
|
73
|
-
// f_evaluate_state: '已评价',
|
|
74
|
-
// f_evaluate_type: '用户评价',
|
|
75
|
-
// f_evaluate_userid: openid.value,
|
|
76
|
-
// }
|
|
77
|
-
// openApiLogic(data, 'saveEvaluate', formServiveName).then((_res: any) => {
|
|
78
|
-
// showDialog({ message: '评价成功了' }).then(() => {history.back()})
|
|
79
|
-
// }).catch(() => {
|
|
80
|
-
// showDialog({ message: '评价失败了' })
|
|
17
|
+
const formGroup = ref(null)
|
|
18
|
+
function submit(result) {
|
|
19
|
+
console.log('>>>> result: ', result)
|
|
20
|
+
// showDialog({ message: '提交成功' }).then(() => {
|
|
21
|
+
// history.back()
|
|
81
22
|
// })
|
|
82
|
-
if (params) {
|
|
83
|
-
emit('onSumbit', params)
|
|
84
|
-
showDialog({ message: '评价成功了' }).then(() => {
|
|
85
|
-
history.back()
|
|
86
|
-
})
|
|
87
|
-
}
|
|
88
|
-
else {
|
|
89
|
-
showDialog({ message: '评价失败了' }).then(() => {
|
|
90
|
-
history.back()
|
|
91
|
-
})
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
// 查询需要修改的数据
|
|
96
|
-
async function getUpdateData() {
|
|
97
|
-
if (api.value && updateId) {
|
|
98
|
-
const res = await post(api.value, updateId)
|
|
99
|
-
updateData.value = res.data[0]
|
|
100
|
-
}
|
|
101
23
|
}
|
|
102
24
|
</script>
|
|
103
25
|
|
|
104
26
|
<template>
|
|
105
|
-
<NormalDataLayout id="
|
|
27
|
+
<NormalDataLayout id="XFormGroupView" title="纯表单">
|
|
106
28
|
<template #layout_content>
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
style="margin-bottom: 14px;"
|
|
117
|
-
@on-submit="onSubmit"
|
|
118
|
-
/>
|
|
119
|
-
</VanSpace>
|
|
29
|
+
<!-- v-if="isInit" -->
|
|
30
|
+
<XFormGroup
|
|
31
|
+
ref="formGroup"
|
|
32
|
+
:config-name="configName"
|
|
33
|
+
:service-name="serviceName"
|
|
34
|
+
:group-form-data="formData"
|
|
35
|
+
mode="新增"
|
|
36
|
+
@submit="submit"
|
|
37
|
+
/>
|
|
120
38
|
</template>
|
|
121
39
|
</NormalDataLayout>
|
|
122
40
|
</template>
|
|
123
41
|
|
|
124
|
-
<style scoped>
|
|
125
|
-
|
|
126
|
-
margin: 0;
|
|
127
|
-
padding: 32px 16px 16px;
|
|
128
|
-
color: black;
|
|
129
|
-
font-weight: 400;
|
|
130
|
-
font-size: 14px;
|
|
131
|
-
line-height: 16px;
|
|
132
|
-
}
|
|
42
|
+
<style scoped lang="less">
|
|
43
|
+
|
|
133
44
|
</style>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import XForm from '@af-mobile-client-vue3/components/data/XForm/index.vue'
|
|
3
|
+
import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
|
|
4
|
+
import { getConfigByName } from '@af-mobile-client-vue3/services/api/common'
|
|
5
|
+
import { nextTick, onMounted, ref } from 'vue'
|
|
6
|
+
|
|
7
|
+
const xForm = ref(null)
|
|
8
|
+
const serviceName = 'af-linepatrol'
|
|
9
|
+
|
|
10
|
+
onMounted(() => {
|
|
11
|
+
const modifyModelData = {
|
|
12
|
+
t1_f_number: '点位编号',
|
|
13
|
+
t2_f_name: '所属区域',
|
|
14
|
+
t1_f_address: '116.450355,40.057394',
|
|
15
|
+
t1_f_describe: '点位描述',
|
|
16
|
+
t1_f_state: '点位状态',
|
|
17
|
+
}
|
|
18
|
+
getConfigByName('PointBindingForm', async (res) => {
|
|
19
|
+
const initData = {
|
|
20
|
+
formItems: res, // 琉璃配置
|
|
21
|
+
serviceName, // 服务名称
|
|
22
|
+
formData: JSON.stringify(modifyModelData), // 数据
|
|
23
|
+
mode: '修改', // 修改
|
|
24
|
+
}
|
|
25
|
+
console.log('>>>> initData: ', JSON.stringify(initData))
|
|
26
|
+
await nextTick()
|
|
27
|
+
xForm.value.init(initData)
|
|
28
|
+
}, 'af-linepatrol')
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
// 提交操作
|
|
32
|
+
function onSubmit(params) {
|
|
33
|
+
console.log('>>>> params: ', JSON.stringify(params))
|
|
34
|
+
}
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
<template>
|
|
38
|
+
<NormalDataLayout id="XFormView" title="XForm表单">
|
|
39
|
+
<template #layout_content>
|
|
40
|
+
<XForm
|
|
41
|
+
ref="xForm"
|
|
42
|
+
service-name="af-linepatrol"
|
|
43
|
+
@on-submit="onSubmit"
|
|
44
|
+
/>
|
|
45
|
+
</template>
|
|
46
|
+
</NormalDataLayout>
|
|
47
|
+
</template>
|
|
48
|
+
|
|
49
|
+
<style scoped>
|
|
50
|
+
</style>
|
|
@@ -1,120 +1,118 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import type { LocationResult } from '@af-mobile-client-vue3/components/data/XOlMap/types'
|
|
3
|
-
import LocationPicker from '@af-mobile-client-vue3/components/data/XOlMap/XLocationPicker/index.vue'
|
|
4
|
-
import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
|
|
5
|
-
import { showNotify } from 'vant'
|
|
6
|
-
import { ref } from 'vue'
|
|
7
|
-
|
|
8
|
-
const selectedLocation = ref<LocationResult>()
|
|
9
|
-
|
|
10
|
-
// 处理位置选择
|
|
11
|
-
function handleLocationConfirm(location: LocationResult) {
|
|
12
|
-
// console.log('选择的位置:', location)
|
|
13
|
-
// selectedLocation.value = location
|
|
14
|
-
showNotify({ type: 'success', message: '位置已选择' })
|
|
15
|
-
}
|
|
16
|
-
</script>
|
|
17
|
-
|
|
18
|
-
<template>
|
|
19
|
-
<NormalDataLayout id="XLocationPicker" title="XOlMap地址选择器">
|
|
20
|
-
<template #layout_content>
|
|
21
|
-
<div class="location-picker-demo">
|
|
22
|
-
<!-- 页面标题 -->
|
|
23
|
-
<div class="page-header">
|
|
24
|
-
<div class="title">
|
|
25
|
-
位置选择
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
28
|
-
|
|
29
|
-
<!-- 选择结果展示 -->
|
|
30
|
-
<div v-if="selectedLocation" class="location-result">
|
|
31
|
-
<div class="label">
|
|
32
|
-
已选位置:
|
|
33
|
-
</div>
|
|
34
|
-
<div class="value">
|
|
35
|
-
{{ selectedLocation.address }}
|
|
36
|
-
</div>
|
|
37
|
-
<div class="coordinates">
|
|
38
|
-
经度: {{ selectedLocation.longitude.toFixed(6) }},
|
|
39
|
-
纬度: {{ selectedLocation.latitude.toFixed(6) }}
|
|
40
|
-
</div>
|
|
41
|
-
</div>
|
|
42
|
-
|
|
43
|
-
<!-- 地图组件 -->
|
|
44
|
-
<div class="map-container">
|
|
45
|
-
<LocationPicker
|
|
46
|
-
v-model="selectedLocation"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
font-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
</style>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { LocationResult } from '@af-mobile-client-vue3/components/data/XOlMap/types'
|
|
3
|
+
import LocationPicker from '@af-mobile-client-vue3/components/data/XOlMap/XLocationPicker/index.vue'
|
|
4
|
+
import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
|
|
5
|
+
import { showNotify } from 'vant'
|
|
6
|
+
import { ref } from 'vue'
|
|
7
|
+
|
|
8
|
+
const selectedLocation = ref<LocationResult>()
|
|
9
|
+
|
|
10
|
+
// 处理位置选择
|
|
11
|
+
function handleLocationConfirm(location: LocationResult) {
|
|
12
|
+
// console.log('选择的位置:', location)
|
|
13
|
+
// selectedLocation.value = location
|
|
14
|
+
showNotify({ type: 'success', message: '位置已选择' })
|
|
15
|
+
}
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<NormalDataLayout id="XLocationPicker" title="XOlMap地址选择器">
|
|
20
|
+
<template #layout_content>
|
|
21
|
+
<div class="location-picker-demo">
|
|
22
|
+
<!-- 页面标题 -->
|
|
23
|
+
<div class="page-header">
|
|
24
|
+
<div class="title">
|
|
25
|
+
位置选择
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<!-- 选择结果展示 -->
|
|
30
|
+
<div v-if="selectedLocation" class="location-result">
|
|
31
|
+
<div class="label">
|
|
32
|
+
已选位置:
|
|
33
|
+
</div>
|
|
34
|
+
<div class="value">
|
|
35
|
+
{{ selectedLocation.address }}
|
|
36
|
+
</div>
|
|
37
|
+
<div class="coordinates">
|
|
38
|
+
经度: {{ selectedLocation.longitude.toFixed(6) }},
|
|
39
|
+
纬度: {{ selectedLocation.latitude.toFixed(6) }}
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<!-- 地图组件 -->
|
|
44
|
+
<div class="map-container">
|
|
45
|
+
<LocationPicker
|
|
46
|
+
v-model="selectedLocation"
|
|
47
|
+
:default-center="[108.948024, 34.263161]"
|
|
48
|
+
:default-zoom="12"
|
|
49
|
+
@confirm="handleLocationConfirm"
|
|
50
|
+
/>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
</template>
|
|
54
|
+
</NormalDataLayout>
|
|
55
|
+
</template>
|
|
56
|
+
|
|
57
|
+
<style scoped lang="less">
|
|
58
|
+
.location-picker-demo {
|
|
59
|
+
width: 100%;
|
|
60
|
+
height: 100%;
|
|
61
|
+
position: relative;
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
background-color: #f7f8fa;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.page-header {
|
|
68
|
+
height: 44px;
|
|
69
|
+
display: flex;
|
|
70
|
+
align-items: center;
|
|
71
|
+
justify-content: center;
|
|
72
|
+
background: white;
|
|
73
|
+
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
|
|
74
|
+
position: relative;
|
|
75
|
+
z-index: 1;
|
|
76
|
+
|
|
77
|
+
.title {
|
|
78
|
+
font-size: 16px;
|
|
79
|
+
color: #333;
|
|
80
|
+
font-weight: 500;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.location-result {
|
|
85
|
+
background: white;
|
|
86
|
+
padding: 12px 16px;
|
|
87
|
+
margin: 10px;
|
|
88
|
+
border-radius: 8px;
|
|
89
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
|
90
|
+
|
|
91
|
+
.label {
|
|
92
|
+
font-size: 14px;
|
|
93
|
+
color: #666;
|
|
94
|
+
margin-bottom: 4px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.value {
|
|
98
|
+
font-size: 16px;
|
|
99
|
+
color: #333;
|
|
100
|
+
margin-bottom: 8px;
|
|
101
|
+
word-break: break-all;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.coordinates {
|
|
105
|
+
font-size: 12px;
|
|
106
|
+
color: #999;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.map-container {
|
|
111
|
+
flex: 1;
|
|
112
|
+
position: relative;
|
|
113
|
+
margin: 0 10px 10px 10px;
|
|
114
|
+
border-radius: 8px;
|
|
115
|
+
overflow: hidden;
|
|
116
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
117
|
+
}
|
|
118
|
+
</style>
|
|
@@ -63,14 +63,12 @@ const wmsConfig = {
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
// 初始化地图
|
|
66
|
-
onMounted(() => {
|
|
67
|
-
mapRef.value.init({
|
|
66
|
+
onMounted(async () => {
|
|
67
|
+
await mapRef.value.init({
|
|
68
68
|
center: [108.948024, 34.263161], // 西安坐标
|
|
69
69
|
zoom: 12,
|
|
70
|
-
maxZoom: 18,
|
|
71
|
-
minZoom: 4,
|
|
72
70
|
})
|
|
73
|
-
mapRef.value.addWMSLayers(wmsConfig)
|
|
71
|
+
await mapRef.value.addWMSLayers(wmsConfig)
|
|
74
72
|
})
|
|
75
73
|
|
|
76
74
|
// 地图控制函数
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import XReportForm from '@af-mobile-client-vue3/components/data/XReportForm/index.vue'
|
|
3
|
-
|
|
4
|
-
import { onMounted, onUnmounted, ref } from 'vue'
|
|
5
|
-
|
|
6
|
-
const localConfig = ref(undefined)
|
|
7
|
-
const configName = ref(undefined)
|
|
8
|
-
const configData = ref(undefined)
|
|
9
|
-
|
|
10
|
-
function receiveMessage(event) {
|
|
11
|
-
try {
|
|
12
|
-
if (event.data && typeof event.data === 'object' && event.data.type === 'setConfig') {
|
|
13
|
-
localConfig.value = event.data.localConfig
|
|
14
|
-
configName.value = event.data.configName
|
|
15
|
-
configData.value = event.data.configData
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
catch (e) {
|
|
19
|
-
console.error(e)
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
onMounted(() => {
|
|
24
|
-
window.addEventListener('message', receiveMessage, false)
|
|
25
|
-
window.parent.postMessage('calParentSend', '*')
|
|
26
|
-
})
|
|
27
|
-
|
|
28
|
-
onUnmounted(() => {
|
|
29
|
-
window.removeEventListener('message', receiveMessage, false)
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
function saveConfig(_config) {
|
|
33
|
-
const config = JSON.parse(JSON.stringify(_config))
|
|
34
|
-
window.parent.postMessage({
|
|
35
|
-
type: 'saveConfig',
|
|
36
|
-
config,
|
|
37
|
-
}, '*')
|
|
38
|
-
}
|
|
39
|
-
</script>
|
|
40
|
-
|
|
41
|
-
<template>
|
|
42
|
-
<!-- 业务上只保存了data,传递的 localconfig 也是 data 这里临时吧 localconfig 作为data使用 -->
|
|
43
|
-
<XReportForm v-if="localConfig || configName" :config-name="configName" :show-nav="false" :local-config="localConfig" :config-data="configData" @save-config="saveConfig" />
|
|
44
|
-
</template>
|
|
45
|
-
|
|
46
|
-
<style scoped lang="less">
|
|
47
|
-
</style>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import XReportForm from '@af-mobile-client-vue3/components/data/XReportForm/index.vue'
|
|
3
|
+
|
|
4
|
+
import { onMounted, onUnmounted, ref } from 'vue'
|
|
5
|
+
|
|
6
|
+
const localConfig = ref(undefined)
|
|
7
|
+
const configName = ref(undefined)
|
|
8
|
+
const configData = ref(undefined)
|
|
9
|
+
|
|
10
|
+
function receiveMessage(event) {
|
|
11
|
+
try {
|
|
12
|
+
if (event.data && typeof event.data === 'object' && event.data.type === 'setConfig') {
|
|
13
|
+
localConfig.value = event.data.localConfig
|
|
14
|
+
configName.value = event.data.configName
|
|
15
|
+
configData.value = event.data.configData
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
catch (e) {
|
|
19
|
+
console.error(e)
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
onMounted(() => {
|
|
24
|
+
window.addEventListener('message', receiveMessage, false)
|
|
25
|
+
window.parent.postMessage('calParentSend', '*')
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
onUnmounted(() => {
|
|
29
|
+
window.removeEventListener('message', receiveMessage, false)
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
function saveConfig(_config) {
|
|
33
|
+
const config = JSON.parse(JSON.stringify(_config))
|
|
34
|
+
window.parent.postMessage({
|
|
35
|
+
type: 'saveConfig',
|
|
36
|
+
config,
|
|
37
|
+
}, '*')
|
|
38
|
+
}
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<template>
|
|
42
|
+
<!-- 业务上只保存了data,传递的 localconfig 也是 data 这里临时吧 localconfig 作为data使用 -->
|
|
43
|
+
<XReportForm v-if="localConfig || configName" :config-name="configName" :show-nav="false" :local-config="localConfig" :config-data="configData" @save-config="saveConfig" />
|
|
44
|
+
</template>
|
|
45
|
+
|
|
46
|
+
<style scoped lang="less">
|
|
47
|
+
</style>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import XReportForm from '@af-mobile-client-vue3/components/data/XReportForm/index.vue'
|
|
3
|
-
import { ref } from 'vue'
|
|
4
|
-
|
|
5
|
-
const configName = ref('ceshi1')
|
|
6
|
-
</script>
|
|
7
|
-
|
|
8
|
-
<template>
|
|
9
|
-
<XReportForm :config-name="configName" />
|
|
10
|
-
</template>
|
|
11
|
-
|
|
12
|
-
<style scoped lang="less">
|
|
13
|
-
</style>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import XReportForm from '@af-mobile-client-vue3/components/data/XReportForm/index.vue'
|
|
3
|
+
import { ref } from 'vue'
|
|
4
|
+
|
|
5
|
+
const configName = ref('ceshi1')
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<XReportForm :config-name="configName" />
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<style scoped lang="less">
|
|
13
|
+
</style>
|