af-mobile-client-vue3 1.1.7 → 1.1.8

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 (74) 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/XCellList/index.vue +2 -1
  22. package/src/components/data/XOlMap/utils/wgs84ToGcj02.js +154 -154
  23. package/src/components/data/XReportForm/XReportFormJsonRender.vue +220 -220
  24. package/src/components/data/XReportForm/index.vue +1079 -1079
  25. package/src/components/data/XReportGrid/XAddReport/index.ts +1 -1
  26. package/src/components/data/XReportGrid/XReportDrawer/index.ts +1 -1
  27. package/src/components/data/XSignature/index.vue +285 -285
  28. package/src/components/data/XTag/index.vue +10 -10
  29. package/src/components/layout/NormalDataLayout/index.vue +70 -70
  30. package/src/components/layout/TabBarLayout/index.vue +40 -40
  31. package/src/components.d.ts +53 -53
  32. package/src/env.d.ts +16 -16
  33. package/src/font-style/font.css +3 -3
  34. package/src/hooks/useCommon.ts +9 -9
  35. package/src/locales/en-US.json +25 -25
  36. package/src/locales/zh-CN.json +25 -25
  37. package/src/plugins/AppData.ts +38 -38
  38. package/src/router/guards.ts +59 -59
  39. package/src/router/index.ts +61 -61
  40. package/src/router/invoiceRoutes.ts +33 -33
  41. package/src/services/api/common.ts +109 -109
  42. package/src/services/api/manage.ts +8 -8
  43. package/src/services/api/search.ts +16 -16
  44. package/src/services/restTools.ts +56 -56
  45. package/src/services/v3Api.ts +11 -11
  46. package/src/stores/modules/setting.ts +52 -52
  47. package/src/stores/mutation-type.ts +7 -7
  48. package/src/utils/authority-utils.ts +84 -84
  49. package/src/utils/crypto.ts +39 -39
  50. package/src/utils/i18n.ts +41 -41
  51. package/src/utils/indexedDB.ts +180 -180
  52. package/src/utils/mobileUtil.ts +26 -26
  53. package/src/utils/routerUtil.ts +271 -271
  54. package/src/utils/runEvalFunction.ts +13 -13
  55. package/src/utils/wechatUtil.ts +9 -9
  56. package/src/views/common/LoadError.vue +64 -64
  57. package/src/views/common/NotFound.vue +68 -68
  58. package/src/views/component/EvaluateRecordView/index.vue +40 -40
  59. package/src/views/component/XCellDetailView/index.vue +217 -217
  60. package/src/views/component/XCellListView/index.vue +2 -2
  61. package/src/views/component/XOlMapView/XLocationPicker/index.vue +120 -120
  62. package/src/views/component/XReportFormIframeView/index.vue +47 -47
  63. package/src/views/component/XReportFormView/index.vue +13 -13
  64. package/src/views/component/XSignatureView/index.vue +50 -50
  65. package/src/views/component/menu.vue +117 -117
  66. package/src/views/component/notice.vue +46 -46
  67. package/src/views/component/topNav.vue +36 -36
  68. package/src/views/invoiceShow/index.vue +61 -61
  69. package/src/views/user/login/ForgetPasswordForm.vue +94 -94
  70. package/src/views/user/login/LoginTitle.vue +68 -68
  71. package/src/views/user/login/index.vue +22 -22
  72. package/src/views/user/my/index.vue +230 -230
  73. package/src/vue-router.d.ts +9 -9
  74. package/tsconfig.json +43 -43
@@ -1,120 +1,120 @@
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
- tian-di-tu-key="c16876b28898637c0a1a68b3fa410504"
48
- amap-key="5ebabc4536d4b42e0dd1e20175cca8ab"
49
- :default-center="[108.948024, 34.263161]"
50
- :default-zoom="12"
51
- @confirm="handleLocationConfirm"
52
- />
53
- </div>
54
- </div>
55
- </template>
56
- </NormalDataLayout>
57
- </template>
58
-
59
- <style scoped lang="less">
60
- .location-picker-demo {
61
- width: 100%;
62
- height: 100%;
63
- position: relative;
64
- display: flex;
65
- flex-direction: column;
66
- background-color: #f7f8fa;
67
- }
68
-
69
- .page-header {
70
- height: 44px;
71
- display: flex;
72
- align-items: center;
73
- justify-content: center;
74
- background: white;
75
- box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
76
- position: relative;
77
- z-index: 1;
78
-
79
- .title {
80
- font-size: 16px;
81
- color: #333;
82
- font-weight: 500;
83
- }
84
- }
85
-
86
- .location-result {
87
- background: white;
88
- padding: 12px 16px;
89
- margin: 10px;
90
- border-radius: 8px;
91
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
92
-
93
- .label {
94
- font-size: 14px;
95
- color: #666;
96
- margin-bottom: 4px;
97
- }
98
-
99
- .value {
100
- font-size: 16px;
101
- color: #333;
102
- margin-bottom: 8px;
103
- word-break: break-all;
104
- }
105
-
106
- .coordinates {
107
- font-size: 12px;
108
- color: #999;
109
- }
110
- }
111
-
112
- .map-container {
113
- flex: 1;
114
- position: relative;
115
- margin: 0 10px 10px 10px;
116
- border-radius: 8px;
117
- overflow: hidden;
118
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
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
+ tian-di-tu-key="c16876b28898637c0a1a68b3fa410504"
48
+ amap-key="5ebabc4536d4b42e0dd1e20175cca8ab"
49
+ :default-center="[108.948024, 34.263161]"
50
+ :default-zoom="12"
51
+ @confirm="handleLocationConfirm"
52
+ />
53
+ </div>
54
+ </div>
55
+ </template>
56
+ </NormalDataLayout>
57
+ </template>
58
+
59
+ <style scoped lang="less">
60
+ .location-picker-demo {
61
+ width: 100%;
62
+ height: 100%;
63
+ position: relative;
64
+ display: flex;
65
+ flex-direction: column;
66
+ background-color: #f7f8fa;
67
+ }
68
+
69
+ .page-header {
70
+ height: 44px;
71
+ display: flex;
72
+ align-items: center;
73
+ justify-content: center;
74
+ background: white;
75
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
76
+ position: relative;
77
+ z-index: 1;
78
+
79
+ .title {
80
+ font-size: 16px;
81
+ color: #333;
82
+ font-weight: 500;
83
+ }
84
+ }
85
+
86
+ .location-result {
87
+ background: white;
88
+ padding: 12px 16px;
89
+ margin: 10px;
90
+ border-radius: 8px;
91
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
92
+
93
+ .label {
94
+ font-size: 14px;
95
+ color: #666;
96
+ margin-bottom: 4px;
97
+ }
98
+
99
+ .value {
100
+ font-size: 16px;
101
+ color: #333;
102
+ margin-bottom: 8px;
103
+ word-break: break-all;
104
+ }
105
+
106
+ .coordinates {
107
+ font-size: 12px;
108
+ color: #999;
109
+ }
110
+ }
111
+
112
+ .map-container {
113
+ flex: 1;
114
+ position: relative;
115
+ margin: 0 10px 10px 10px;
116
+ border-radius: 8px;
117
+ overflow: hidden;
118
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
119
+ }
120
+ </style>
@@ -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>
@@ -1,50 +1,50 @@
1
- <script setup lang="ts">
2
- import XSignature from '@af-mobile-client-vue3/components/data/XSignature/index.vue'
3
- import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
4
- import { showToast, Image as VanImage } from 'vant'
5
- import { ref } from 'vue'
6
-
7
- const signatureImage = ref('')
8
-
9
- function handleSave() {
10
- showToast('签名已保存')
11
- }
12
-
13
- function handleClear() {
14
- showToast('签名已清除')
15
- }
16
- </script>
17
-
18
- <template>
19
- <NormalDataLayout title="签名组件">
20
- <template #layout_content>
21
- 基础使用
22
- <div class="signature-demo">
23
- <XSignature v-model="signatureImage" @save="handleSave" @clear="handleClear" />
24
- <div v-if="signatureImage" class="preview">
25
- <h3>预览签名</h3>
26
- <VanImage v-if="signatureImage" :src="signatureImage" />
27
- </div>
28
- </div>
29
- </template>
30
- </NormalDataLayout>
31
- </template>
32
-
33
- <style scoped lang="less">
34
- .signature-demo {
35
- padding: 16px;
36
- .preview {
37
- margin-top: 20px;
38
- h3 {
39
- margin: 0 0 10px;
40
- font-size: 16px;
41
- color: #323233;
42
- }
43
- img {
44
- max-width: 100%;
45
- border: 1px solid #ebedf0;
46
- border-radius: 8px;
47
- }
48
- }
49
- }
50
- </style>
1
+ <script setup lang="ts">
2
+ import XSignature from '@af-mobile-client-vue3/components/data/XSignature/index.vue'
3
+ import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
4
+ import { showToast, Image as VanImage } from 'vant'
5
+ import { ref } from 'vue'
6
+
7
+ const signatureImage = ref('')
8
+
9
+ function handleSave() {
10
+ showToast('签名已保存')
11
+ }
12
+
13
+ function handleClear() {
14
+ showToast('签名已清除')
15
+ }
16
+ </script>
17
+
18
+ <template>
19
+ <NormalDataLayout title="签名组件">
20
+ <template #layout_content>
21
+ 基础使用
22
+ <div class="signature-demo">
23
+ <XSignature v-model="signatureImage" @save="handleSave" @clear="handleClear" />
24
+ <div v-if="signatureImage" class="preview">
25
+ <h3>预览签名</h3>
26
+ <VanImage v-if="signatureImage" :src="signatureImage" />
27
+ </div>
28
+ </div>
29
+ </template>
30
+ </NormalDataLayout>
31
+ </template>
32
+
33
+ <style scoped lang="less">
34
+ .signature-demo {
35
+ padding: 16px;
36
+ .preview {
37
+ margin-top: 20px;
38
+ h3 {
39
+ margin: 0 0 10px;
40
+ font-size: 16px;
41
+ color: #323233;
42
+ }
43
+ img {
44
+ max-width: 100%;
45
+ border: 1px solid #ebedf0;
46
+ border-radius: 8px;
47
+ }
48
+ }
49
+ }
50
+ </style>