af-mobile-client-vue3 1.6.19 → 1.6.21

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 (57) hide show
  1. package/.env +11 -11
  2. package/package.json +121 -121
  3. package/src/api/user/index.ts +50 -50
  4. package/src/components/common/MateChat/apiService.ts +310 -310
  5. package/src/components/data/OtherCharge/OtherChargeGroupModal.vue +542 -542
  6. package/src/components/data/UserDetail/api.ts +24 -24
  7. package/src/components/data/UserDetail/index.vue +660 -660
  8. package/src/components/data/XFormGroup/doc/UserForm.vue +102 -102
  9. package/src/components/data/step/index.vue +1975 -1975
  10. package/src/router/invoiceRoutes.ts +37 -37
  11. package/src/services/api/Login.ts +6 -6
  12. package/src/services/v3Api.ts +170 -170
  13. package/src/stores/modules/user.ts +441 -441
  14. package/src/types/platform.ts +194 -194
  15. package/src/utils/Storage.ts +124 -124
  16. package/src/utils/http/index.ts +228 -228
  17. package/src/utils/login/loginVerify.ts +317 -317
  18. package/src/views/SafeInspection/SecurityCertificate/AddDevice/index.vue +662 -661
  19. package/src/views/SafeInspection/SecurityCertificate/OverallHiddenDangers/index.vue +376 -376
  20. package/src/views/SafeInspection/SecurityCertificate/contractSign/index.vue +80 -80
  21. package/src/views/SafeInspection/SecurityCertificate/photoSignature/SignatureComponent/SignatureComponent.vue +285 -285
  22. package/src/views/SafeInspection/SecurityCertificate/photoSignature/index.vue +258 -258
  23. package/src/views/SafeInspection/SecurityCertificate/photoSignature/slots/QinHuaSignature.vue +82 -82
  24. package/src/views/SafeInspection/SecurityCertificate/slots/GasDevice.vue +132 -132
  25. package/src/views/SafeInspection/SecurityCertificate/userInfo/index.vue +1 -0
  26. package/src/views/SafeInspection/SecurityCertificate/userInfo/upaddress.vue +239 -239
  27. package/src/views/SafeInspection/SecurityFormItem/XMultiSelect/index.vue +194 -194
  28. package/src/views/SafeInspection/SecurityFormItem/XSignature/index.vue +68 -68
  29. package/src/views/SafeInspection/SecurityFormItem/index.vue +418 -418
  30. package/src/views/component/UserDetailView/UserDetailPage.vue +78 -78
  31. package/src/views/component/UserDetailView/index.vue +234 -234
  32. package/src/views/external/index.vue +158 -158
  33. package/src/views/user/employeeBinding/index.vue +392 -392
  34. package/src/views/user/register/index.vue +995 -995
  35. package/src/views/userRecords/AbnormalAlarmRecords.vue +21 -21
  36. package/src/views/userRecords/CardReplacementRecords.vue +21 -21
  37. package/src/views/userRecords/ChangeRecords.vue +19 -19
  38. package/src/views/userRecords/CommandViewRecords.vue +20 -20
  39. package/src/views/userRecords/GasCompensationRecords.vue +20 -20
  40. package/src/views/userRecords/GasPurchaseRecords.vue +19 -19
  41. package/src/views/userRecords/InstrumentCollectionRecords.vue +21 -21
  42. package/src/views/userRecords/MeterRecords.vue +20 -20
  43. package/src/views/userRecords/OperateRecords.vue +51 -51
  44. package/src/views/userRecords/OtherChargeRecords.vue +19 -19
  45. package/src/views/userRecords/PaymentRecords.vue +114 -114
  46. package/src/views/userRecords/PriceAdjustmentRecords.vue +19 -19
  47. package/src/views/userRecords/RepairRecords.vue +19 -19
  48. package/src/views/userRecords/ReplacementRecords.vue +19 -19
  49. package/src/views/userRecords/SafetyRecords.vue +19 -19
  50. package/src/views/userRecords/TransactionRecords.vue +21 -21
  51. package/src/views/userRecords/TransferGasRecords.vue +19 -19
  52. package/src/views/userRecords/TransferRecords.vue +19 -19
  53. package/vite.config.ts +121 -121
  54. package/certs/127.0.0.1+2-key.pem +0 -28
  55. package/certs/127.0.0.1+2.pem +0 -27
  56. package/mock/modules/prose.mock.ts.timestamp-1758877157774.mjs +0 -53
  57. package/mock/modules/user.mock.ts.timestamp-1758877157774.mjs +0 -97
@@ -1,102 +1,102 @@
1
- <script setup lang="ts">
2
- import { CellGroup as VanCellGroup, Field as VanField } from 'vant'
3
- import { onMounted, onUnmounted, ref } from 'vue'
4
-
5
- interface UserFormProps {
6
- setRef?: (refValue: any) => void
7
- removeRef?: (refValue: any) => void
8
- formGroupName?: string
9
- formData?: any
10
- }
11
-
12
- const props = withDefaults(defineProps<UserFormProps>(), {
13
- setRef: () => {},
14
- removeRef: () => {},
15
- formGroupName: 'userInfo',
16
- formData: () => ({}),
17
- })
18
-
19
- const formData = ref({
20
- name: '',
21
- phone: '',
22
- email: '',
23
- ...props.formData,
24
- })
25
-
26
- async function validate() {
27
- if (!formData.value.name) {
28
- throw new Error('姓名不能为空')
29
- }
30
- if (!formData.value.phone) {
31
- throw new Error('手机号不能为空')
32
- }
33
- const phoneRegex = /^1[3-9]\d{9}$/
34
- if (!phoneRegex.test(formData.value.phone)) {
35
- throw new Error('手机号格式不正确')
36
- }
37
- return Promise.resolve()
38
- }
39
-
40
- function getFormData() {
41
- return {
42
- name: formData.value.name,
43
- phone: formData.value.phone,
44
- email: formData.value.email,
45
- }
46
- }
47
-
48
- function resetForm() {
49
- formData.value = {
50
- name: '',
51
- phone: '',
52
- email: '',
53
- }
54
- }
55
-
56
- const exposeObj = {
57
- validate,
58
- getFormData,
59
- resetForm,
60
- formGroupName: props.formGroupName,
61
- }
62
-
63
- defineExpose(exposeObj)
64
-
65
- onMounted(() => {
66
- props.setRef(exposeObj)
67
- })
68
-
69
- onUnmounted(() => {
70
- props.removeRef(exposeObj)
71
- })
72
- </script>
73
-
74
- <template>
75
- <div class="user-form">
76
- <VanCellGroup inset>
77
- <VanField
78
- v-model="formData.name"
79
- label="姓名"
80
- placeholder="请输入姓名"
81
- :rules="[{ required: true, message: '请输入姓名' }]"
82
- />
83
- <VanField
84
- v-model="formData.phone"
85
- label="手机号"
86
- placeholder="请输入手机号"
87
- :rules="[{ required: true, message: '请输入手机号' }]"
88
- />
89
- <VanField
90
- v-model="formData.email"
91
- label="邮箱"
92
- placeholder="请输入邮箱"
93
- />
94
- </VanCellGroup>
95
- </div>
96
- </template>
97
-
98
- <style scoped lang="less">
99
- .user-form {
100
- padding: 16px;
101
- }
102
- </style>
1
+ <script setup lang="ts">
2
+ import { CellGroup as VanCellGroup, Field as VanField } from 'vant'
3
+ import { onMounted, onUnmounted, ref } from 'vue'
4
+
5
+ interface UserFormProps {
6
+ setRef?: (refValue: any) => void
7
+ removeRef?: (refValue: any) => void
8
+ formGroupName?: string
9
+ formData?: any
10
+ }
11
+
12
+ const props = withDefaults(defineProps<UserFormProps>(), {
13
+ setRef: () => {},
14
+ removeRef: () => {},
15
+ formGroupName: 'userInfo',
16
+ formData: () => ({}),
17
+ })
18
+
19
+ const formData = ref({
20
+ name: '',
21
+ phone: '',
22
+ email: '',
23
+ ...props.formData,
24
+ })
25
+
26
+ async function validate() {
27
+ if (!formData.value.name) {
28
+ throw new Error('姓名不能为空')
29
+ }
30
+ if (!formData.value.phone) {
31
+ throw new Error('手机号不能为空')
32
+ }
33
+ const phoneRegex = /^1[3-9]\d{9}$/
34
+ if (!phoneRegex.test(formData.value.phone)) {
35
+ throw new Error('手机号格式不正确')
36
+ }
37
+ return Promise.resolve()
38
+ }
39
+
40
+ function getFormData() {
41
+ return {
42
+ name: formData.value.name,
43
+ phone: formData.value.phone,
44
+ email: formData.value.email,
45
+ }
46
+ }
47
+
48
+ function resetForm() {
49
+ formData.value = {
50
+ name: '',
51
+ phone: '',
52
+ email: '',
53
+ }
54
+ }
55
+
56
+ const exposeObj = {
57
+ validate,
58
+ getFormData,
59
+ resetForm,
60
+ formGroupName: props.formGroupName,
61
+ }
62
+
63
+ defineExpose(exposeObj)
64
+
65
+ onMounted(() => {
66
+ props.setRef(exposeObj)
67
+ })
68
+
69
+ onUnmounted(() => {
70
+ props.removeRef(exposeObj)
71
+ })
72
+ </script>
73
+
74
+ <template>
75
+ <div class="user-form">
76
+ <VanCellGroup inset>
77
+ <VanField
78
+ v-model="formData.name"
79
+ label="姓名"
80
+ placeholder="请输入姓名"
81
+ :rules="[{ required: true, message: '请输入姓名' }]"
82
+ />
83
+ <VanField
84
+ v-model="formData.phone"
85
+ label="手机号"
86
+ placeholder="请输入手机号"
87
+ :rules="[{ required: true, message: '请输入手机号' }]"
88
+ />
89
+ <VanField
90
+ v-model="formData.email"
91
+ label="邮箱"
92
+ placeholder="请输入邮箱"
93
+ />
94
+ </VanCellGroup>
95
+ </div>
96
+ </template>
97
+
98
+ <style scoped lang="less">
99
+ .user-form {
100
+ padding: 16px;
101
+ }
102
+ </style>