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.
Files changed (80) hide show
  1. package/.env +6 -6
  2. package/.env.development +4 -4
  3. package/.env.envoiceShow +6 -6
  4. package/.env.production +6 -6
  5. package/.husky/commit-msg +1 -1
  6. package/.husky/pre-commit +1 -1
  7. package/.vscode/settings.json +61 -61
  8. package/mock/modules/user.mock.ts +152 -152
  9. package/package.json +1 -1
  10. package/public/favicon.svg +4 -4
  11. package/public/safari-pinned-tab.svg +32 -32
  12. package/scripts/verifyCommit.js +19 -19
  13. package/src/App.vue +43 -43
  14. package/src/api/user/index.ts +40 -40
  15. package/src/bootstrap.ts +18 -18
  16. package/src/components/core/NavBar/index.vue +12 -12
  17. package/src/components/core/Tabbar/index.vue +38 -38
  18. package/src/components/core/XGridDropOption/index.vue +151 -151
  19. package/src/components/core/XMultiSelect/index.vue +183 -183
  20. package/src/components/data/XCellDetail/index.vue +106 -106
  21. package/src/components/data/XFormItem/index.vue +26 -7
  22. package/src/components/data/XOlMap/XLocationPicker/index.vue +7 -9
  23. package/src/components/data/XOlMap/index.vue +103 -96
  24. package/src/components/data/XOlMap/utils/wgs84ToGcj02.js +154 -154
  25. package/src/components/data/XReportForm/XReportFormJsonRender.vue +220 -220
  26. package/src/components/data/XReportForm/index.vue +1079 -1079
  27. package/src/components/data/XReportGrid/XAddReport/index.ts +1 -1
  28. package/src/components/data/XReportGrid/XReportDrawer/index.ts +1 -1
  29. package/src/components/data/XSignature/index.vue +285 -285
  30. package/src/components/data/XTag/index.vue +10 -10
  31. package/src/components/layout/NormalDataLayout/index.vue +70 -70
  32. package/src/components/layout/TabBarLayout/index.vue +40 -40
  33. package/src/components.d.ts +53 -53
  34. package/src/env.d.ts +16 -16
  35. package/src/font-style/font.css +3 -3
  36. package/src/hooks/useCommon.ts +9 -9
  37. package/src/locales/en-US.json +25 -25
  38. package/src/locales/zh-CN.json +25 -25
  39. package/src/plugins/AppData.ts +38 -38
  40. package/src/router/guards.ts +59 -59
  41. package/src/router/index.ts +61 -61
  42. package/src/router/invoiceRoutes.ts +33 -33
  43. package/src/services/api/common.ts +109 -109
  44. package/src/services/api/manage.ts +8 -8
  45. package/src/services/api/search.ts +16 -16
  46. package/src/services/restTools.ts +56 -56
  47. package/src/services/v3Api.ts +11 -11
  48. package/src/stores/modules/setting.ts +52 -52
  49. package/src/stores/mutation-type.ts +7 -7
  50. package/src/utils/authority-utils.ts +84 -84
  51. package/src/utils/crypto.ts +39 -39
  52. package/src/utils/i18n.ts +41 -41
  53. package/src/utils/indexedDB.ts +180 -180
  54. package/src/utils/mobileUtil.ts +26 -26
  55. package/src/utils/routerUtil.ts +271 -271
  56. package/src/utils/runEvalFunction.ts +13 -13
  57. package/src/utils/wechatUtil.ts +9 -9
  58. package/src/views/common/LoadError.vue +64 -64
  59. package/src/views/common/NotFound.vue +68 -68
  60. package/src/views/component/EvaluateRecordView/index.vue +40 -40
  61. package/src/views/component/XCellDetailView/index.vue +217 -217
  62. package/src/views/component/XCellListView/index.vue +3 -88
  63. package/src/views/component/XFormGroupView/index.vue +0 -37
  64. package/src/views/component/XFormView/index.vue +30 -119
  65. package/src/views/component/XFormView/oldindex.vue +50 -0
  66. package/src/views/component/XOlMapView/XLocationPicker/index.vue +118 -120
  67. package/src/views/component/XOlMapView/index.vue +3 -5
  68. package/src/views/component/XReportFormIframeView/index.vue +47 -47
  69. package/src/views/component/XReportFormView/index.vue +13 -13
  70. package/src/views/component/XSignatureView/index.vue +50 -50
  71. package/src/views/component/menu.vue +117 -117
  72. package/src/views/component/notice.vue +46 -46
  73. package/src/views/component/topNav.vue +36 -36
  74. package/src/views/invoiceShow/index.vue +61 -61
  75. package/src/views/user/login/ForgetPasswordForm.vue +94 -94
  76. package/src/views/user/login/LoginTitle.vue +68 -68
  77. package/src/views/user/login/index.vue +22 -22
  78. package/src/views/user/my/index.vue +230 -230
  79. package/src/vue-router.d.ts +9 -9
  80. package/tsconfig.json +43 -43
@@ -7,4 +7,4 @@ export default {
7
7
  install(app: App) {
8
8
  app.component('XAddReport', XAddReport)
9
9
  },
10
- }
10
+ }
@@ -7,4 +7,4 @@ export default {
7
7
  install(app: App) {
8
8
  app.component('XReportDrawer', XReportDrawer)
9
9
  },
10
- }
10
+ }
@@ -1,285 +1,285 @@
1
- <script setup lang="ts">
2
- import {
3
- showToast,
4
- Button as VanButton,
5
- Icon as VanIcon,
6
- Popup as VanPopup,
7
- Signature as VanSignature,
8
- } from 'vant'
9
- import { computed, nextTick, onBeforeUnmount, onMounted, ref } from 'vue'
10
-
11
- interface Props {
12
- /** 签名图片的 base64 字符串 */
13
- modelValue?: string
14
- /** 签名笔画的宽度,默认为 3 */
15
- lineWidth?: number
16
- /** 签名笔画的颜色,默认为黑色 '#000' */
17
- strokeStyle?: string
18
- /** 签名画布的背景颜色,默认为白色 '#fff' */
19
- backgroundColor?: string
20
- /** 未签名时按钮显示的文字,默认为 '签名' */
21
- buttonText?: string
22
- /** 自定义 CSS 类名 */
23
- customClass?: string
24
- /** 是否隐藏底部按钮组,默认为 false */
25
- hideButtons?: boolean
26
- /** 按钮尺寸,可选值为 'small' | 'normal' | 'large',默认为 'normal' */
27
- buttonSize?: 'small' | 'normal' | 'large'
28
- /** 确认按钮文字,默认为 '确认' */
29
- confirmButtonText?: string
30
- /** 清除按钮文字,默认为 '清除' */
31
- clearButtonText?: string
32
- /** 是否显示签名预览图,默认为 true */
33
- showPreview?: boolean
34
- /** 签名完成后是否显示重新签名按钮,默认为 false */
35
- showButtonAfterSigned?: boolean
36
- }
37
-
38
- withDefaults(defineProps<Props>(), {
39
- modelValue: '',
40
- lineWidth: 3,
41
- strokeStyle: '#000',
42
- backgroundColor: '#fff',
43
- buttonText: '签名',
44
- customClass: '',
45
- hideButtons: false,
46
- buttonSize: 'normal',
47
- confirmButtonText: '确认',
48
- clearButtonText: '清除',
49
- showPreview: true,
50
- showButtonAfterSigned: false,
51
- })
52
-
53
- const emit = defineEmits<{
54
- 'update:modelValue': [value: string]
55
- 'save': [image: string]
56
- 'clear': []
57
- }>()
58
-
59
- interface SignatureResult {
60
- image: string
61
- }
62
-
63
- const showSignature = ref(false)
64
-
65
- function onSubmit({ image }: SignatureResult) {
66
- if (!image) {
67
- showToast('获取签名失败')
68
- return
69
- }
70
- emit('update:modelValue', image)
71
- emit('save', image)
72
- showSignature.value = false
73
- }
74
-
75
- function onClear() {
76
- emit('update:modelValue', '')
77
- emit('clear')
78
- showSignature.value = false
79
- }
80
-
81
- const signatureRef = ref()
82
-
83
- function handleSubmit() {
84
- try {
85
- signatureRef.value?.submit()
86
- }
87
- catch (error) {
88
- showToast('签名提交失败')
89
- console.error('Signature submit error:', error)
90
- }
91
- }
92
-
93
- const popupStyle = computed(() => ({
94
- width: '100%',
95
- height: window.innerHeight > window.innerWidth ? 'auto' : '100%',
96
- }))
97
-
98
- function handleOrientationChange() {
99
- if (showSignature.value) {
100
- nextTick(() => {
101
- signatureRef.value?.resize()
102
- })
103
- }
104
- }
105
-
106
- onMounted(() => {
107
- window.addEventListener('orientationchange', handleOrientationChange)
108
- })
109
-
110
- onBeforeUnmount(() => {
111
- window.removeEventListener('orientationchange', handleOrientationChange)
112
- })
113
- </script>
114
-
115
- <template>
116
- <div class="x-signature" role="application" aria-label="签名面板">
117
- <div class="signature-content">
118
- <div v-if="modelValue && showPreview" class="signature-preview" @click="showSignature = true">
119
- <img :src="modelValue" alt="签名预览">
120
- </div>
121
- <VanButton
122
- v-if="!modelValue || showButtonAfterSigned"
123
- type="primary"
124
- size="small"
125
- aria-label="打开签名面板"
126
- @click="showSignature = true"
127
- >
128
- {{ modelValue ? '重新签名' : buttonText }}
129
- </VanButton>
130
- </div>
131
-
132
- <VanPopup v-model:show="showSignature" class="signature-popup" :style="popupStyle">
133
- <div class="signature-wrapper">
134
- <VanSignature
135
- ref="signatureRef"
136
- :line-width="lineWidth"
137
- :stroke-style="strokeStyle"
138
- :background-color="backgroundColor"
139
- @submit="onSubmit"
140
- @clear="onClear"
141
- />
142
- <!-- 自定义浮动按钮,仅在横屏时显示 -->
143
- <div class="custom-buttons">
144
- <VanButton round size="small" aria-label="清除签名" @click="onClear">
145
- <VanIcon name="delete" />
146
- </VanButton>
147
- <VanButton round type="primary" size="small" @click="handleSubmit">
148
- <VanIcon name="success" />
149
- </VanButton>
150
- </div>
151
- </div>
152
- </VanPopup>
153
- </div>
154
- </template>
155
-
156
- <style scoped lang="less">
157
- .x-signature {
158
- width: 100%;
159
-
160
- .signature-content {
161
- display: flex;
162
- align-items: center;
163
- gap: 12px;
164
- }
165
-
166
- .signature-preview {
167
- flex: 1;
168
- border: 1px solid #eee;
169
- border-radius: 4px;
170
- padding: 8px;
171
- display: flex;
172
- align-items: center;
173
-
174
- img {
175
- max-width: 100%;
176
- max-height: 36px;
177
- height: auto;
178
- display: block;
179
- }
180
- }
181
-
182
- .van-button {
183
- flex-shrink: 0;
184
- }
185
-
186
- :deep(.van-popup) {
187
- max-width: none !important;
188
- width: 100% !important;
189
- top: 20% !important;
190
- transform: none !important;
191
- transition: all 0.3s ease-in-out;
192
- }
193
-
194
- .signature-wrapper {
195
- width: 100%;
196
- height: 100%;
197
- position: relative;
198
-
199
- :deep(.van-signature) {
200
- width: 100% !important;
201
- height: 100% !important;
202
- max-width: none !important;
203
- }
204
-
205
- // 默认隐藏自定义按钮
206
- .custom-buttons {
207
- display: none;
208
- }
209
- }
210
-
211
- // 横屏模式样式
212
- @media screen and (orientation: landscape) {
213
- :deep(.van-popup) {
214
- top: 0 !important;
215
- right: 0 !important;
216
- bottom: 0 !important;
217
- left: 0 !important;
218
- width: 100% !important;
219
- height: 100% !important;
220
- display: flex;
221
- flex-direction: column;
222
- }
223
-
224
- .signature-wrapper {
225
- flex: 1;
226
- display: flex;
227
- justify-content: center;
228
- align-items: center;
229
- padding: env(safe-area-inset-top) env(safe-area-inset-right)
230
- env(safe-area-inset-bottom) env(safe-area-inset-left);
231
-
232
- :deep(.van-signature) {
233
- // 隐藏原有的底部按钮
234
- .van-signature__footer {
235
- display: none;
236
- }
237
- }
238
-
239
- :deep(.van-signature__content) {
240
- height: 95% !important;
241
- }
242
-
243
- // 显示自定义浮动按钮
244
- .custom-buttons {
245
- position: absolute;
246
- right: 32px;
247
- bottom: 32px;
248
- display: flex;
249
- gap: 16px;
250
-
251
- .van-button {
252
- width: 48px !important;
253
- height: 48px !important;
254
- border-radius: 50% !important;
255
- padding: 0 !important;
256
- display: flex;
257
- align-items: center;
258
- justify-content: center;
259
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
260
- transition: transform 0.2s ease;
261
-
262
- &--default {
263
- background: #fff;
264
- }
265
-
266
- &:active {
267
- transform: scale(0.95);
268
- }
269
- }
270
- }
271
- }
272
- }
273
-
274
- // 优化按钮触摸反馈
275
- .custom-buttons {
276
- .van-button {
277
- transition: transform 0.2s ease;
278
-
279
- &:active {
280
- transform: scale(0.95);
281
- }
282
- }
283
- }
284
- }
285
- </style>
1
+ <script setup lang="ts">
2
+ import {
3
+ showToast,
4
+ Button as VanButton,
5
+ Icon as VanIcon,
6
+ Popup as VanPopup,
7
+ Signature as VanSignature,
8
+ } from 'vant'
9
+ import { computed, nextTick, onBeforeUnmount, onMounted, ref } from 'vue'
10
+
11
+ interface Props {
12
+ /** 签名图片的 base64 字符串 */
13
+ modelValue?: string
14
+ /** 签名笔画的宽度,默认为 3 */
15
+ lineWidth?: number
16
+ /** 签名笔画的颜色,默认为黑色 '#000' */
17
+ strokeStyle?: string
18
+ /** 签名画布的背景颜色,默认为白色 '#fff' */
19
+ backgroundColor?: string
20
+ /** 未签名时按钮显示的文字,默认为 '签名' */
21
+ buttonText?: string
22
+ /** 自定义 CSS 类名 */
23
+ customClass?: string
24
+ /** 是否隐藏底部按钮组,默认为 false */
25
+ hideButtons?: boolean
26
+ /** 按钮尺寸,可选值为 'small' | 'normal' | 'large',默认为 'normal' */
27
+ buttonSize?: 'small' | 'normal' | 'large'
28
+ /** 确认按钮文字,默认为 '确认' */
29
+ confirmButtonText?: string
30
+ /** 清除按钮文字,默认为 '清除' */
31
+ clearButtonText?: string
32
+ /** 是否显示签名预览图,默认为 true */
33
+ showPreview?: boolean
34
+ /** 签名完成后是否显示重新签名按钮,默认为 false */
35
+ showButtonAfterSigned?: boolean
36
+ }
37
+
38
+ withDefaults(defineProps<Props>(), {
39
+ modelValue: '',
40
+ lineWidth: 3,
41
+ strokeStyle: '#000',
42
+ backgroundColor: '#fff',
43
+ buttonText: '签名',
44
+ customClass: '',
45
+ hideButtons: false,
46
+ buttonSize: 'normal',
47
+ confirmButtonText: '确认',
48
+ clearButtonText: '清除',
49
+ showPreview: true,
50
+ showButtonAfterSigned: false,
51
+ })
52
+
53
+ const emit = defineEmits<{
54
+ 'update:modelValue': [value: string]
55
+ 'save': [image: string]
56
+ 'clear': []
57
+ }>()
58
+
59
+ interface SignatureResult {
60
+ image: string
61
+ }
62
+
63
+ const showSignature = ref(false)
64
+
65
+ function onSubmit({ image }: SignatureResult) {
66
+ if (!image) {
67
+ showToast('获取签名失败')
68
+ return
69
+ }
70
+ emit('update:modelValue', image)
71
+ emit('save', image)
72
+ showSignature.value = false
73
+ }
74
+
75
+ function onClear() {
76
+ emit('update:modelValue', '')
77
+ emit('clear')
78
+ showSignature.value = false
79
+ }
80
+
81
+ const signatureRef = ref()
82
+
83
+ function handleSubmit() {
84
+ try {
85
+ signatureRef.value?.submit()
86
+ }
87
+ catch (error) {
88
+ showToast('签名提交失败')
89
+ console.error('Signature submit error:', error)
90
+ }
91
+ }
92
+
93
+ const popupStyle = computed(() => ({
94
+ width: '100%',
95
+ height: window.innerHeight > window.innerWidth ? 'auto' : '100%',
96
+ }))
97
+
98
+ function handleOrientationChange() {
99
+ if (showSignature.value) {
100
+ nextTick(() => {
101
+ signatureRef.value?.resize()
102
+ })
103
+ }
104
+ }
105
+
106
+ onMounted(() => {
107
+ window.addEventListener('orientationchange', handleOrientationChange)
108
+ })
109
+
110
+ onBeforeUnmount(() => {
111
+ window.removeEventListener('orientationchange', handleOrientationChange)
112
+ })
113
+ </script>
114
+
115
+ <template>
116
+ <div class="x-signature" role="application" aria-label="签名面板">
117
+ <div class="signature-content">
118
+ <div v-if="modelValue && showPreview" class="signature-preview" @click="showSignature = true">
119
+ <img :src="modelValue" alt="签名预览">
120
+ </div>
121
+ <VanButton
122
+ v-if="!modelValue || showButtonAfterSigned"
123
+ type="primary"
124
+ size="small"
125
+ aria-label="打开签名面板"
126
+ @click="showSignature = true"
127
+ >
128
+ {{ modelValue ? '重新签名' : buttonText }}
129
+ </VanButton>
130
+ </div>
131
+
132
+ <VanPopup v-model:show="showSignature" class="signature-popup" :style="popupStyle">
133
+ <div class="signature-wrapper">
134
+ <VanSignature
135
+ ref="signatureRef"
136
+ :line-width="lineWidth"
137
+ :stroke-style="strokeStyle"
138
+ :background-color="backgroundColor"
139
+ @submit="onSubmit"
140
+ @clear="onClear"
141
+ />
142
+ <!-- 自定义浮动按钮,仅在横屏时显示 -->
143
+ <div class="custom-buttons">
144
+ <VanButton round size="small" aria-label="清除签名" @click="onClear">
145
+ <VanIcon name="delete" />
146
+ </VanButton>
147
+ <VanButton round type="primary" size="small" @click="handleSubmit">
148
+ <VanIcon name="success" />
149
+ </VanButton>
150
+ </div>
151
+ </div>
152
+ </VanPopup>
153
+ </div>
154
+ </template>
155
+
156
+ <style scoped lang="less">
157
+ .x-signature {
158
+ width: 100%;
159
+
160
+ .signature-content {
161
+ display: flex;
162
+ align-items: center;
163
+ gap: 12px;
164
+ }
165
+
166
+ .signature-preview {
167
+ flex: 1;
168
+ border: 1px solid #eee;
169
+ border-radius: 4px;
170
+ padding: 8px;
171
+ display: flex;
172
+ align-items: center;
173
+
174
+ img {
175
+ max-width: 100%;
176
+ max-height: 36px;
177
+ height: auto;
178
+ display: block;
179
+ }
180
+ }
181
+
182
+ .van-button {
183
+ flex-shrink: 0;
184
+ }
185
+
186
+ :deep(.van-popup) {
187
+ max-width: none !important;
188
+ width: 100% !important;
189
+ top: 20% !important;
190
+ transform: none !important;
191
+ transition: all 0.3s ease-in-out;
192
+ }
193
+
194
+ .signature-wrapper {
195
+ width: 100%;
196
+ height: 100%;
197
+ position: relative;
198
+
199
+ :deep(.van-signature) {
200
+ width: 100% !important;
201
+ height: 100% !important;
202
+ max-width: none !important;
203
+ }
204
+
205
+ // 默认隐藏自定义按钮
206
+ .custom-buttons {
207
+ display: none;
208
+ }
209
+ }
210
+
211
+ // 横屏模式样式
212
+ @media screen and (orientation: landscape) {
213
+ :deep(.van-popup) {
214
+ top: 0 !important;
215
+ right: 0 !important;
216
+ bottom: 0 !important;
217
+ left: 0 !important;
218
+ width: 100% !important;
219
+ height: 100% !important;
220
+ display: flex;
221
+ flex-direction: column;
222
+ }
223
+
224
+ .signature-wrapper {
225
+ flex: 1;
226
+ display: flex;
227
+ justify-content: center;
228
+ align-items: center;
229
+ padding: env(safe-area-inset-top) env(safe-area-inset-right)
230
+ env(safe-area-inset-bottom) env(safe-area-inset-left);
231
+
232
+ :deep(.van-signature) {
233
+ // 隐藏原有的底部按钮
234
+ .van-signature__footer {
235
+ display: none;
236
+ }
237
+ }
238
+
239
+ :deep(.van-signature__content) {
240
+ height: 95% !important;
241
+ }
242
+
243
+ // 显示自定义浮动按钮
244
+ .custom-buttons {
245
+ position: absolute;
246
+ right: 32px;
247
+ bottom: 32px;
248
+ display: flex;
249
+ gap: 16px;
250
+
251
+ .van-button {
252
+ width: 48px !important;
253
+ height: 48px !important;
254
+ border-radius: 50% !important;
255
+ padding: 0 !important;
256
+ display: flex;
257
+ align-items: center;
258
+ justify-content: center;
259
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
260
+ transition: transform 0.2s ease;
261
+
262
+ &--default {
263
+ background: #fff;
264
+ }
265
+
266
+ &:active {
267
+ transform: scale(0.95);
268
+ }
269
+ }
270
+ }
271
+ }
272
+ }
273
+
274
+ // 优化按钮触摸反馈
275
+ .custom-buttons {
276
+ .van-button {
277
+ transition: transform 0.2s ease;
278
+
279
+ &:active {
280
+ transform: scale(0.95);
281
+ }
282
+ }
283
+ }
284
+ }
285
+ </style>
@@ -1,10 +1,10 @@
1
- <script setup lang="ts">
2
- </script>
3
-
4
- <template>
5
- <VanTag />
6
- </template>
7
-
8
- <style scoped lang="less">
9
-
10
- </style>
1
+ <script setup lang="ts">
2
+ </script>
3
+
4
+ <template>
5
+ <VanTag />
6
+ </template>
7
+
8
+ <style scoped lang="less">
9
+
10
+ </style>