af-mobile-client-vue3 1.3.22 → 1.3.23
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/components/data/XForm/index.vue +1 -1
- package/src/components/data/XFormGroup/doc/DeviceForm.vue +1 -1
- package/src/components/data/XFormGroup/doc/UserForm.vue +1 -1
- package/src/components/data/XOlMap/utils/wgs84ToGcj02.js +154 -154
- package/src/components/data/XReportGrid/XReportDemo.vue +33 -33
- package/src/components/data/XReportGrid/print.js +184 -184
- package/src/stores/index.ts +3 -1
- package/src/stores/modules/homeApp/README.md +124 -0
- package/src/stores/modules/homeApp.ts +54 -0
- package/src/stores/modules/setting.ts +11 -1
- package/src/views/component/XCellListView/index.vue +131 -14
- package/src/views/component/XFormGroupView/index.vue +20 -14
- package/src/views/component/XFormView/index.vue +0 -15
- package/src/views/component/XOlMapView/XLocationPicker/index.vue +118 -118
- package/vite.config.ts +2 -2
- package/src/views/component/XFormView/oldindex.vue +0 -70
|
@@ -1,30 +1,147 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import XCellList from '@af-mobile-client-vue3/components/data/XCellList/index.vue'
|
|
3
|
-
import {
|
|
3
|
+
import { defineOptions, onActivated, onMounted, ref } from 'vue'
|
|
4
4
|
import { useRouter } from 'vue-router'
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
defineOptions({ name: 'XCellListView' })
|
|
7
|
+
const configName = ref('ApplyMobileProcessCRUD')
|
|
8
|
+
const serviceName = ref('af-apply')
|
|
7
9
|
const router = useRouter()
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
//
|
|
11
|
-
function toDetail(row) {
|
|
12
|
-
emit('addressSelected', {
|
|
13
|
-
f_address: row.tua_f_address,
|
|
14
|
-
f_address_id: row.tua_id,
|
|
15
|
-
})
|
|
10
|
+
// 删除功能
|
|
11
|
+
function phone(result) {
|
|
12
|
+
// todo 调用真机进行通话
|
|
16
13
|
}
|
|
14
|
+
// 跳转流程处理
|
|
15
|
+
function action(row) {
|
|
16
|
+
router.push({ name: 'XFormGroupView', query: { workflowId: row.ab_f_workflow_id, stepId: row.ws_f_step_id } })
|
|
17
|
+
}
|
|
18
|
+
// 工作日志
|
|
19
|
+
function worklog(row) {
|
|
20
|
+
router.push({ name: 'worklog', query: { workflowid: row.ab_f_workflow_id, defname: row.ws_f_name } })
|
|
21
|
+
}
|
|
22
|
+
onMounted(() => {
|
|
23
|
+
console.log('初始化页面===')
|
|
24
|
+
})
|
|
25
|
+
onActivated(() => {
|
|
26
|
+
// 每次回到页面都会触发
|
|
27
|
+
console.log('activated: 每次回到页面都会触发')
|
|
28
|
+
})
|
|
17
29
|
</script>
|
|
18
30
|
|
|
19
31
|
<template>
|
|
20
32
|
<XCellList
|
|
21
|
-
ref="xCellListRefPatrolPlan"
|
|
22
|
-
service-name="af-apply"
|
|
23
33
|
:config-name="configName"
|
|
24
|
-
:
|
|
25
|
-
@
|
|
34
|
+
:service-name="serviceName"
|
|
35
|
+
@phone="phone"
|
|
36
|
+
@action="action"
|
|
37
|
+
@worklog="worklog"
|
|
26
38
|
/>
|
|
27
39
|
</template>
|
|
28
40
|
|
|
29
41
|
<style scoped lang="less">
|
|
42
|
+
.cell-search-after {
|
|
43
|
+
padding: 0 12px 12px 12px;
|
|
44
|
+
background-color: #fff;
|
|
45
|
+
.van-row:first-child {
|
|
46
|
+
align-items: center;
|
|
47
|
+
margin-bottom: 8px;
|
|
48
|
+
padding: 0 2px;
|
|
49
|
+
h4 {
|
|
50
|
+
font-size: 1.08rem;
|
|
51
|
+
font-weight: 600;
|
|
52
|
+
margin: 0;
|
|
53
|
+
color: #222;
|
|
54
|
+
letter-spacing: 1px;
|
|
55
|
+
}
|
|
56
|
+
.stat-date-range {
|
|
57
|
+
display: flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
justify-content: flex-end;
|
|
60
|
+
font-size: 0.92rem;
|
|
61
|
+
color: #b0b3b8;
|
|
62
|
+
font-weight: 400;
|
|
63
|
+
span {
|
|
64
|
+
margin-left: 4px;
|
|
65
|
+
font-size: 0.92rem;
|
|
66
|
+
color: #b0b3b8;
|
|
67
|
+
}
|
|
68
|
+
.van-icon {
|
|
69
|
+
font-size: 1rem;
|
|
70
|
+
color: #b0b3b8;
|
|
71
|
+
margin-right: 2px;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
.van-row:nth-child(2) {
|
|
76
|
+
margin-top: 8px;
|
|
77
|
+
// 统计卡片间距由gutter控制
|
|
78
|
+
.van-col {
|
|
79
|
+
// 让卡片宽度自适应
|
|
80
|
+
.stat-card {
|
|
81
|
+
width: 100%;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
.stat-card {
|
|
86
|
+
display: flex;
|
|
87
|
+
flex-direction: column;
|
|
88
|
+
align-items: center;
|
|
89
|
+
justify-content: center;
|
|
90
|
+
border-radius: 12px;
|
|
91
|
+
padding: 6px 0 4px 0; // 压缩高度
|
|
92
|
+
min-height: 44px; // 压缩高度
|
|
93
|
+
position: relative;
|
|
94
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
|
|
95
|
+
background: #f7f8fa;
|
|
96
|
+
.stat-num {
|
|
97
|
+
font-size: 1.08rem; // 缩小字体
|
|
98
|
+
font-weight: 600;
|
|
99
|
+
margin-bottom: 2px;
|
|
100
|
+
}
|
|
101
|
+
.stat-label {
|
|
102
|
+
font-size: 0.82rem; // 缩小字体
|
|
103
|
+
margin-bottom: 2px;
|
|
104
|
+
}
|
|
105
|
+
.stat-icon {
|
|
106
|
+
position: absolute;
|
|
107
|
+
top: 6px;
|
|
108
|
+
right: 8px;
|
|
109
|
+
font-size: 1rem;
|
|
110
|
+
opacity: 0.4;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
.stat-total {
|
|
114
|
+
background: #f0f5ff;
|
|
115
|
+
color: #2f54eb;
|
|
116
|
+
.stat-num,
|
|
117
|
+
.stat-label {
|
|
118
|
+
color: #2f54eb;
|
|
119
|
+
}
|
|
120
|
+
.stat-icon {
|
|
121
|
+
color: #2f54eb;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
.stat-done {
|
|
125
|
+
background: #e6fffb;
|
|
126
|
+
color: #13c2c2;
|
|
127
|
+
.stat-num,
|
|
128
|
+
.stat-label {
|
|
129
|
+
color: #13c2c2;
|
|
130
|
+
}
|
|
131
|
+
.stat-icon {
|
|
132
|
+
color: #13c2c2;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
.stat-processing {
|
|
136
|
+
background: #f9f0ff;
|
|
137
|
+
color: #b37feb;
|
|
138
|
+
.stat-num,
|
|
139
|
+
.stat-label {
|
|
140
|
+
color: #b37feb;
|
|
141
|
+
}
|
|
142
|
+
.stat-icon {
|
|
143
|
+
color: #b37feb;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
30
147
|
</style>
|
|
@@ -16,22 +16,20 @@ const serviceName = ref('af-apply')
|
|
|
16
16
|
// const configName = ref('lngChargeAuditMobileFormGroup')
|
|
17
17
|
// const serviceName = ref('af-gaslink')
|
|
18
18
|
|
|
19
|
-
const formData = ref({})
|
|
19
|
+
const formData = ref({ t_userinfo: { f_user_name: 111 } })
|
|
20
20
|
const formGroup = ref(null)
|
|
21
21
|
const route = useRoute()
|
|
22
22
|
const isInit = ref(false)
|
|
23
|
-
|
|
24
|
-
const formShow = {
|
|
25
|
-
showt_userinfo: true,
|
|
26
|
-
showdevices: true
|
|
27
|
-
}
|
|
28
|
-
|
|
29
23
|
function submit(_result) {
|
|
30
|
-
showDialog({ message: '提交成功' })
|
|
31
|
-
|
|
32
|
-
|
|
24
|
+
showDialog({ message: '提交成功' })
|
|
25
|
+
history.back()
|
|
26
|
+
}
|
|
27
|
+
const myXForm = ref([])
|
|
28
|
+
function setRef(value: any) {
|
|
29
|
+
console.log('myXForm', myXForm)
|
|
30
|
+
formGroup.value.setRef(myXForm.value)
|
|
31
|
+
console.log(formGroup)
|
|
33
32
|
}
|
|
34
|
-
|
|
35
33
|
// 表单组——数据
|
|
36
34
|
// function initComponents () {
|
|
37
35
|
// runLogic('getlngChargeAuditMobileFormGroupData', {id: 29}, 'af-gaslink').then((res) => {
|
|
@@ -61,22 +59,30 @@ function submit(_result) {
|
|
|
61
59
|
// onBeforeMount(() => {
|
|
62
60
|
// initComponents()
|
|
63
61
|
// })
|
|
62
|
+
function a() {
|
|
63
|
+
formData.value.t_userinfo.f_user_name = '453333333'
|
|
64
|
+
}
|
|
64
65
|
</script>
|
|
65
66
|
|
|
66
67
|
<template>
|
|
67
68
|
<NormalDataLayout id="XFormGroupView" title="纯表单">
|
|
68
69
|
<template #layout_content>
|
|
70
|
+
<button @click="a">
|
|
71
|
+
修改
|
|
72
|
+
</button>
|
|
69
73
|
<!-- v-if="isInit" -->
|
|
70
74
|
<XFormGroup
|
|
71
75
|
ref="formGroup"
|
|
72
76
|
:config-name="configName"
|
|
73
77
|
:service-name="serviceName"
|
|
74
78
|
:group-form-data="formData"
|
|
75
|
-
:form-show="formShow"
|
|
76
79
|
mode="新增"
|
|
77
|
-
:is-scrollspy="true"
|
|
78
80
|
@submit="submit"
|
|
79
|
-
|
|
81
|
+
>
|
|
82
|
+
<!-- <template #device="{ setRef, removeRef, item, formData }">
|
|
83
|
+
<XFormView :setRef="setRef" :formGroupName="'myXForm'"/>
|
|
84
|
+
</template> -->
|
|
85
|
+
</XFormGroup>
|
|
80
86
|
</template>
|
|
81
87
|
</NormalDataLayout>
|
|
82
88
|
</template>
|
|
@@ -7,19 +7,8 @@ const configName = ref('AddConstructionForm')
|
|
|
7
7
|
const serviceName = ref('af-linepatrol')
|
|
8
8
|
|
|
9
9
|
const formGroupAddConstruction = ref(null)
|
|
10
|
-
function emitFunc(func, data) {
|
|
11
|
-
if (func === 'selectAddress') {
|
|
12
|
-
const add = 'ccss'
|
|
13
|
-
// 设置单个字段
|
|
14
|
-
formGroupAddConstruction.value?.setForm({ address: '你的字符串' })
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
function submit(data) {
|
|
18
|
-
console.log('>>>> data: ', JSON.stringify(data))
|
|
19
|
-
}
|
|
20
10
|
</script>
|
|
21
11
|
|
|
22
|
-
<!-- workflowId -->
|
|
23
12
|
<template>
|
|
24
13
|
<NormalDataLayout id="XFormGroupView" title="纯表单">
|
|
25
14
|
<template #layout_content>
|
|
@@ -28,10 +17,6 @@ function submit(data) {
|
|
|
28
17
|
mode="新增"
|
|
29
18
|
:config-name="configName"
|
|
30
19
|
:service-name="serviceName"
|
|
31
|
-
:param-logic-name-param="{ aa: 123 }"
|
|
32
|
-
:form-data="{ f_project_name: 333 }"
|
|
33
|
-
@x-form-item-emit-func="emitFunc"
|
|
34
|
-
@on-submit="submit"
|
|
35
20
|
/>
|
|
36
21
|
</template>
|
|
37
22
|
</NormalDataLayout>
|
|
@@ -1,118 +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
|
-
: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>
|
|
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>
|
package/vite.config.ts
CHANGED
|
@@ -11,8 +11,8 @@ export default ({ mode }: ConfigEnv): UserConfig => {
|
|
|
11
11
|
|
|
12
12
|
const appProxys = {}
|
|
13
13
|
|
|
14
|
-
const v4Server = 'http://192.168.50.67:
|
|
15
|
-
const v3Server = 'http://192.168.50.67:
|
|
14
|
+
const v4Server = 'http://192.168.50.67:31567'
|
|
15
|
+
const v3Server = 'http://192.168.50.67:31567'
|
|
16
16
|
const OSSServerDev = 'http://192.168.50.67:30351'
|
|
17
17
|
const geoserver = 'http://39.104.49.8:30372'
|
|
18
18
|
// const OSSServerProd = 'http://192.168.50.67:31351'
|
|
@@ -1,70 +0,0 @@
|
|
|
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 { onBeforeMount, ref, toRaw } from 'vue'
|
|
6
|
-
|
|
7
|
-
const configName = ref('AddConstructionForm')
|
|
8
|
-
const serviceName = ref('af-linepatrol')
|
|
9
|
-
const formGroup = ref(null)
|
|
10
|
-
const formConfig = ref(null)
|
|
11
|
-
const submitSimple = ref(null)
|
|
12
|
-
const isLoading = ref(true)
|
|
13
|
-
|
|
14
|
-
function safeStringify(obj) {
|
|
15
|
-
const seen = new WeakSet()
|
|
16
|
-
return JSON.stringify(toRaw(obj), (key, val) => {
|
|
17
|
-
if (typeof val === 'object' && val !== null) {
|
|
18
|
-
if (seen.has(val))
|
|
19
|
-
return
|
|
20
|
-
seen.add(val)
|
|
21
|
-
}
|
|
22
|
-
return val
|
|
23
|
-
}, 2)
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function submit(result) {
|
|
27
|
-
console.log('>>>> result: ', safeStringify(result))
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function loadConfig() {
|
|
31
|
-
return new Promise((resolve) => {
|
|
32
|
-
getConfigByName(configName.value, (result) => {
|
|
33
|
-
submitSimple.value = result.showSubmitBtn
|
|
34
|
-
formConfig.value = result
|
|
35
|
-
resolve(result)
|
|
36
|
-
}, serviceName.value)
|
|
37
|
-
})
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
onBeforeMount(async () => {
|
|
41
|
-
try {
|
|
42
|
-
await loadConfig()
|
|
43
|
-
}
|
|
44
|
-
finally {
|
|
45
|
-
isLoading.value = false
|
|
46
|
-
}
|
|
47
|
-
})
|
|
48
|
-
</script>
|
|
49
|
-
|
|
50
|
-
<template>
|
|
51
|
-
<NormalDataLayout id="XFormGroupView" title="纯表单">
|
|
52
|
-
<template #layout_content>
|
|
53
|
-
<van-loading v-if="isLoading" />
|
|
54
|
-
<XForm
|
|
55
|
-
v-else
|
|
56
|
-
ref="formGroup"
|
|
57
|
-
mode="查询"
|
|
58
|
-
:service-name="serviceName"
|
|
59
|
-
:group-form-items="formConfig"
|
|
60
|
-
:form-data="{}"
|
|
61
|
-
:form-name="formConfig?.groupName || '11111'"
|
|
62
|
-
:submit-button="submitSimple"
|
|
63
|
-
@on-submit="submit"
|
|
64
|
-
/>
|
|
65
|
-
</template>
|
|
66
|
-
</NormalDataLayout>
|
|
67
|
-
</template>
|
|
68
|
-
|
|
69
|
-
<style scoped lang="less">
|
|
70
|
-
</style>
|