af-mobile-client-vue3 1.2.23 → 1.2.25
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/core/ImageUploader/index.vue +159 -159
- package/src/components/data/XForm/index.vue +1 -3
- package/src/components/data/XFormGroup/index.vue +172 -133
- package/src/components/data/XFormItem/index.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/modules/user.ts +2 -2
- package/src/views/component/XCellListView/index.vue +126 -13
- package/src/views/component/XFormGroupView/index.vue +50 -3
- package/src/views/component/XFormView/index.vue +57 -28
- package/src/views/component/XOlMapView/XLocationPicker/index.vue +118 -118
- package/src/views/user/login/LoginForm.vue +2 -14
- package/vite.config.ts +2 -2
- package/src/views/component/XFormView/oldindex.vue +0 -70
|
@@ -1,41 +1,70 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import XForm from '@af-mobile-client-vue3/components/data/XForm/index.vue'
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
3
|
+
import { runLogic } from '@af-mobile-client-vue3/services/api/common'
|
|
4
|
+
import { post } from '@af-mobile-client-vue3/services/restTools'
|
|
5
|
+
import { useUserStore } from '@af-mobile-client-vue3/stores/modules/user'
|
|
6
|
+
import dayjs from 'dayjs/esm/index'
|
|
7
|
+
import { showFailToast, showToast } from 'vant'
|
|
8
|
+
import {computed, defineEmits, onMounted, ref} from 'vue'
|
|
9
|
+
import { useRoute } from 'vue-router'
|
|
5
10
|
|
|
6
|
-
const configName = ref('
|
|
7
|
-
const serviceName = ref('af-
|
|
11
|
+
const configName = ref('addappapplychargeForm')
|
|
12
|
+
const serviceName = ref('af-apply')
|
|
13
|
+
const route = useRoute()
|
|
14
|
+
const userInfo = useUserStore().getUserInfo()
|
|
15
|
+
const workflowId = computed(() => route.query.workflowid)
|
|
16
|
+
const formData = ref({})
|
|
8
17
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
18
|
+
const emits = defineEmits(['setRef'])
|
|
19
|
+
|
|
20
|
+
function submit(res) {
|
|
21
|
+
if (Number(res.charge_money) > Number(res.surplus_money)) {
|
|
22
|
+
showFailToast('收费金额不能大于未结金额!!')
|
|
23
|
+
return
|
|
24
|
+
}
|
|
25
|
+
const saveData = {
|
|
26
|
+
f_payment_type: res.payment_type,
|
|
27
|
+
f_charge_money: res.charge_money,
|
|
28
|
+
f_amount_words: res.amount_words,
|
|
29
|
+
f_payment_method: res.payment_method,
|
|
30
|
+
f_actual_date: res.actual_date,
|
|
31
|
+
f_charge_status: '有效',
|
|
32
|
+
f_workflow_id: workflowId.value,
|
|
33
|
+
f_charge_collectors: userInfo.f_operator,
|
|
34
|
+
f_charge_collectors_id: userInfo.f_operatorid,
|
|
35
|
+
f_charge_date: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
|
36
|
+
f_filialeid: userInfo.f_orgid,
|
|
37
|
+
f_filiale: userInfo.f_orgname,
|
|
17
38
|
}
|
|
39
|
+
post('api/af-apply/entity/save/t_charge_record', saveData).then((res) => {
|
|
40
|
+
showToast('提交成功!')
|
|
41
|
+
history.back()
|
|
42
|
+
})
|
|
43
|
+
}
|
|
44
|
+
function init() {
|
|
45
|
+
runLogic('getApplyBusinessrecode', { f_workflow_id: 854 }, 'af-apply').then((res) => {
|
|
46
|
+
formData.value = res
|
|
47
|
+
console.log('res==', res)
|
|
48
|
+
})
|
|
18
49
|
}
|
|
19
|
-
|
|
20
|
-
|
|
50
|
+
onMounted(() => {
|
|
51
|
+
// init()
|
|
52
|
+
emits('setRef')
|
|
53
|
+
})
|
|
54
|
+
function validate(){
|
|
55
|
+
console.log('validate我被调用了')
|
|
21
56
|
}
|
|
57
|
+
defineExpose({ init, validate })
|
|
22
58
|
</script>
|
|
23
59
|
|
|
24
|
-
<!-- workflowId -->
|
|
25
60
|
<template>
|
|
26
|
-
<
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
:param-logic-name-param="{ aa: 123 }"
|
|
34
|
-
@x-form-item-emit-func="emitFunc"
|
|
35
|
-
@on-submit="submit"
|
|
36
|
-
/>
|
|
37
|
-
</template>
|
|
38
|
-
</NormalDataLayout>
|
|
61
|
+
<XForm
|
|
62
|
+
mode="新增"
|
|
63
|
+
:config-name="configName"
|
|
64
|
+
:service-name="serviceName"
|
|
65
|
+
:form-data="formData"
|
|
66
|
+
@on-submit="submit"
|
|
67
|
+
/>
|
|
39
68
|
</template>
|
|
40
69
|
|
|
41
70
|
<style scoped lang="less">
|
|
@@ -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>
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { UserInfo } from '@af-mobile-client-vue3/stores/modules/user'
|
|
3
2
|
import type { FormInstance } from 'vant'
|
|
4
3
|
import { LoginStateEnum, useFormRules, useLoginState } from '@af-mobile-client-vue3/hooks/useLogin'
|
|
5
4
|
import GetAppDataService from '@af-mobile-client-vue3/plugins/AppData'
|
|
@@ -159,21 +158,10 @@ function closeWindows() {
|
|
|
159
158
|
}
|
|
160
159
|
|
|
161
160
|
async function afterGeneral(result) {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
id: result.id,
|
|
161
|
+
const user: any = {
|
|
162
|
+
...result,
|
|
165
163
|
username: result.ename,
|
|
166
|
-
password: formData.password,
|
|
167
|
-
name: result.name,
|
|
168
164
|
avatar: result.avatar ? result.avatar : setting.getSetting()?.defaultAvatarUrl,
|
|
169
|
-
functions: result.functions,
|
|
170
|
-
rolestr: result.rolestr,
|
|
171
|
-
f_operator: result.name,
|
|
172
|
-
f_operatorid: result.id,
|
|
173
|
-
f_orgid: result.orgid,
|
|
174
|
-
f_orgname: result.orgs,
|
|
175
|
-
f_depid: result.f_department_id,
|
|
176
|
-
f_depname: result.f_department_name,
|
|
177
165
|
}
|
|
178
166
|
userState.setUserInfo(user)
|
|
179
167
|
// 如果result中没有返回 权限 需要主动获取权限列表
|
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://
|
|
15
|
-
const v3Server = '
|
|
14
|
+
const v4Server = 'http://192.168.50.67:31577'
|
|
15
|
+
const v3Server = 'https://wkf.qhgas.com'
|
|
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>
|