af-mobile-client-vue3 1.1.5 → 1.1.7

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 (84) 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/build/vite/index.ts +105 -91
  9. package/mock/modules/user.mock.ts +152 -152
  10. package/package.json +3 -1
  11. package/public/favicon.svg +4 -4
  12. package/public/safari-pinned-tab.svg +32 -32
  13. package/scripts/verifyCommit.js +19 -19
  14. package/src/App.vue +43 -43
  15. package/src/api/user/index.ts +40 -40
  16. package/src/bootstrap.ts +18 -18
  17. package/src/components/core/NavBar/index.vue +12 -12
  18. package/src/components/core/Tabbar/index.vue +38 -38
  19. package/src/components/core/Uploader/index.vue +2 -2
  20. package/src/components/core/XGridDropOption/index.vue +151 -151
  21. package/src/components/core/XMultiSelect/index.vue +183 -183
  22. package/src/components/data/XCellDetail/index.vue +106 -106
  23. package/src/components/data/XForm/index.vue +5 -0
  24. package/src/components/data/XFormItem/index.vue +48 -14
  25. package/src/components/data/XOlMap/README.md +0 -2
  26. package/src/components/data/XOlMap/XLocationPicker/index.vue +21 -9
  27. package/src/components/data/XOlMap/index.vue +81 -74
  28. package/src/components/data/XOlMap/types.ts +0 -4
  29. package/src/components/data/XOlMap/utils/wgs84ToGcj02.js +154 -154
  30. package/src/components/data/XReportForm/XReportFormJsonRender.vue +220 -220
  31. package/src/components/data/XReportForm/index.vue +1079 -1079
  32. package/src/components/data/XReportGrid/XAddReport/index.ts +1 -1
  33. package/src/components/data/XReportGrid/XReportDrawer/index.ts +1 -1
  34. package/src/components/data/XSignature/index.vue +285 -285
  35. package/src/components/data/XTag/index.vue +10 -10
  36. package/src/components/layout/NormalDataLayout/index.vue +70 -70
  37. package/src/components/layout/TabBarLayout/index.vue +40 -40
  38. package/src/components.d.ts +53 -53
  39. package/src/env.d.ts +16 -16
  40. package/src/font-style/font.css +3 -3
  41. package/src/hooks/useCommon.ts +9 -9
  42. package/src/locales/en-US.json +25 -25
  43. package/src/locales/zh-CN.json +25 -25
  44. package/src/plugins/AppData.ts +38 -38
  45. package/src/router/guards.ts +59 -59
  46. package/src/router/index.ts +61 -61
  47. package/src/router/invoiceRoutes.ts +33 -33
  48. package/src/router/routes.ts +6 -0
  49. package/src/services/api/common.ts +109 -109
  50. package/src/services/api/manage.ts +8 -8
  51. package/src/services/api/search.ts +16 -16
  52. package/src/services/restTools.ts +56 -56
  53. package/src/services/v3Api.ts +11 -11
  54. package/src/stores/modules/setting.ts +52 -52
  55. package/src/stores/mutation-type.ts +7 -7
  56. package/src/utils/authority-utils.ts +84 -84
  57. package/src/utils/crypto.ts +39 -39
  58. package/src/utils/i18n.ts +41 -41
  59. package/src/utils/indexedDB.ts +180 -180
  60. package/src/utils/mobileUtil.ts +26 -26
  61. package/src/utils/routerUtil.ts +271 -271
  62. package/src/utils/runEvalFunction.ts +13 -13
  63. package/src/utils/wechatUtil.ts +9 -9
  64. package/src/views/common/LoadError.vue +64 -64
  65. package/src/views/common/NotFound.vue +68 -68
  66. package/src/views/component/EvaluateRecordView/index.vue +40 -40
  67. package/src/views/component/IconifyView/index.vue +507 -0
  68. package/src/views/component/XCellDetailView/index.vue +217 -217
  69. package/src/views/component/XOlMapView/XLocationPicker/index.vue +120 -120
  70. package/src/views/component/XOlMapView/index.vue +0 -1
  71. package/src/views/component/XReportFormIframeView/index.vue +47 -47
  72. package/src/views/component/XReportFormView/index.vue +13 -13
  73. package/src/views/component/XSignatureView/index.vue +50 -50
  74. package/src/views/component/index.vue +4 -0
  75. package/src/views/component/menu.vue +117 -117
  76. package/src/views/component/notice.vue +46 -46
  77. package/src/views/component/topNav.vue +36 -36
  78. package/src/views/invoiceShow/index.vue +61 -61
  79. package/src/views/user/login/ForgetPasswordForm.vue +94 -94
  80. package/src/views/user/login/LoginTitle.vue +68 -68
  81. package/src/views/user/login/index.vue +22 -22
  82. package/src/views/user/my/index.vue +230 -230
  83. package/src/vue-router.d.ts +9 -9
  84. package/tsconfig.json +43 -43
@@ -1,220 +1,220 @@
1
- <script setup lang="ts">
2
- import {
3
- Cell as vanCell,
4
- CellGroup as vanCellGroup,
5
- Field as vanField,
6
- Form as vanForm,
7
- Image as vanImage,
8
- } from 'vant'
9
- import { reactive, ref } from 'vue'
10
-
11
- const props = defineProps({
12
- jsonConfig: Object,
13
- })
14
-
15
- const receivedFunction = reactive([])
16
- const contentForMobile = ref([])
17
-
18
- function formatConfig() {
19
- for (let i = 0; i < props.jsonConfig.content.length; i++) {
20
- let tempObj = {
21
- label: undefined,
22
- value: undefined,
23
- valueType: 'str',
24
- }
25
- const item = props.jsonConfig.content[i]
26
- if (item.type === 'jsonKey') {
27
- if (receivedFunction[i].labelFunction(props.jsonConfig).type === 'key')
28
- tempObj.label = props.jsonConfig.data[receivedFunction[i].labelFunction(props.jsonConfig).content]
29
- else if (receivedFunction[i].labelFunction(props.jsonConfig).type === 'value')
30
- tempObj.label = receivedFunction[i].labelFunction(props.jsonConfig).content
31
-
32
- if (receivedFunction[i].valueFunction(props.jsonConfig).type === 'key') {
33
- tempObj.value = props.jsonConfig.data[receivedFunction[i].valueFunction(props.jsonConfig).content]
34
- }
35
- else if (receivedFunction[i].valueFunction(props.jsonConfig).type === 'value') {
36
- tempObj.value = receivedFunction[i].valueFunction(props.jsonConfig).content
37
- }
38
- else if (receivedFunction[i].valueFunction(props.jsonConfig).type === 'img') {
39
- tempObj.valueType = 'img'
40
- tempObj.value = receivedFunction[i].valueFunction(props.jsonConfig).content
41
- }
42
- contentForMobile.value.push(tempObj)
43
- tempObj = {
44
- label: undefined,
45
- value: undefined,
46
- valueType: 'str',
47
- }
48
- }
49
- else if (item.type === 'jsonArray') {
50
- for (let j = 0; j < props.jsonConfig.data[item.jsonArrayDataIndex].length; j++) {
51
- const jsonArrayItem = props.jsonConfig.data[item.jsonArrayDataIndex][j]
52
- if (receivedFunction[i].labelFunction(props.jsonConfig, jsonArrayItem).type === 'key')
53
- tempObj.label = jsonArrayItem[receivedFunction[i].labelFunction(props.jsonConfig, jsonArrayItem).content]
54
- else if (receivedFunction[i].labelFunction(props.jsonConfig, jsonArrayItem).type === 'value')
55
- tempObj.label = receivedFunction[i].labelFunction(props.jsonConfig, jsonArrayItem).content
56
-
57
- if (receivedFunction[i].valueFunction(props.jsonConfig, jsonArrayItem).type === 'key') {
58
- tempObj.value = jsonArrayItem[receivedFunction[i].valueFunction(props.jsonConfig, jsonArrayItem).content]
59
- }
60
- else if (receivedFunction[i].valueFunction(props.jsonConfig, jsonArrayItem).type === 'value') {
61
- tempObj.value = receivedFunction[i].valueFunction(props.jsonConfig, jsonArrayItem).content
62
- }
63
- else if (receivedFunction[i].valueFunction(props.jsonConfig, jsonArrayItem).type === 'img') {
64
- tempObj.valueType = 'img'
65
- tempObj.value = receivedFunction[i].valueFunction(props.jsonConfig, jsonArrayItem).content
66
- }
67
-
68
- contentForMobile.value.push(tempObj)
69
- tempObj = {
70
- label: undefined,
71
- value: undefined,
72
- valueType: 'str',
73
- }
74
- }
75
- }
76
- }
77
- }
78
- // ------------------------- 初始化 -------------------------
79
- initComponent()
80
-
81
- function initComponent() {
82
- for (let i = 0; i < props.jsonConfig.content.length; i++) {
83
- receivedFunction.push({
84
- // eslint-disable-next-line no-eval
85
- labelFunction: eval(`(${props.jsonConfig.content[i].customFunctionForLabel})`),
86
- // eslint-disable-next-line no-eval
87
- valueFunction: eval(`(${props.jsonConfig.content[i].customFunctionForValue})`),
88
- })
89
- }
90
- formatConfig()
91
- }
92
- </script>
93
-
94
- <template>
95
- <div class="main">
96
- <!-- 标题 -->
97
- <template v-if="jsonConfig.title">
98
- <template v-if="jsonConfig.title.type === 'titleKey'">
99
- <h2 class="title" v-html="jsonConfig.data[jsonConfig.title.value]" />
100
- </template>
101
- <template v-else-if="jsonConfig.title.type === 'titleValue'">
102
- <h2 class="title" v-html="jsonConfig.title.value" />
103
- </template>
104
- </template>
105
- <!-- 内容 -->
106
- <van-form>
107
- <van-cell-group inset class="cell_group">
108
- <template v-for="(row, rowIndex) in contentForMobile" :key="rowIndex">
109
- <template v-if="row.valueType === 'str'">
110
- <van-cell center :title="row.label" :value="row.value ? row.value : '无'" />
111
- </template>
112
- <template v-else-if="row.valueType === 'img'">
113
- <template v-for="(img, imgIndex) in row.value" :key="imgIndex">
114
- <van-field :name="row.label" :label="row.label">
115
- <template #input>
116
- <div style="width: 100%;text-align: right">
117
- <van-image :src="img" width="100" height="100" fit="cover" />
118
- </div>
119
- </template>
120
- </van-field>
121
- </template>
122
- </template>
123
- </template>
124
- </van-cell-group>
125
- </van-form>
126
- </div>
127
- </template>
128
-
129
- <style scoped lang="less">
130
- .main{
131
- padding-top: 4vh;
132
- width: 100vw;
133
- height: 100vh;
134
- background-color: #eff2f5;
135
-
136
- .title{
137
- padding-bottom: 2vh;
138
- color: rgb(50, 50, 51);
139
- text-align: center;
140
- margin: 0 0 3vh;
141
- }
142
-
143
- .text_box{
144
- margin-top: 2vh;
145
- margin-bottom: 2vh;
146
- }
147
-
148
- .main_text{
149
- padding-left: 16px;
150
- font-weight: 400;
151
- line-height: 1.6;
152
- margin: 0 0 40px;
153
- color: #969799;
154
- font-size: 14px;
155
- }
156
-
157
- .show_value_item{
158
- text-align: center;
159
- font-size: 1.2em;
160
- }
161
-
162
- .cell_group{
163
- margin-top: 2vh;
164
- margin-bottom: 2vh;
165
- }
166
-
167
- .form_item{
168
- margin-top: 2vh;
169
- }
170
-
171
- .button_group{
172
- text-align: center;
173
- margin-top: 3vh;
174
- margin-bottom: 3vh;
175
- }
176
-
177
- .button_group>:first-child {
178
- margin-right: 3vw;
179
- }
180
-
181
- .divider{
182
- color: #1989fa;
183
- border-color: #1989fa;
184
- padding: 0 16px
185
- }
186
-
187
- .submit_button{
188
- background-color: #eff2f5;
189
- padding: 5vh;
190
- }
191
- }
192
-
193
- .skeleton{
194
- margin-top: 5vh
195
- }
196
- .my-cell-group{
197
- margin: 0 0 10px 0
198
- }
199
- :deep(.van-collapse-item__content) {
200
- background-color: #eff2f5;
201
- padding: 10px 0;
202
- }
203
- :deep(.van-cell-group__title){
204
- padding-top: 10px;
205
- padding-bottom: 10px;
206
- }
207
- :deep(.van-field__label) {
208
- font-weight: 600;
209
- }
210
- :deep(.van-cell__title) {
211
- font-weight: 600;
212
- }
213
- :deep(.van-uploader__wrapper){
214
- padding: 10px;
215
- display: flex;
216
- flex-wrap: wrap;
217
- justify-content: space-between; /* 水平方向上左右分散对齐 */
218
- align-items: center; /* 垂直方向上上下中心对齐 */
219
- }
220
- </style>
1
+ <script setup lang="ts">
2
+ import {
3
+ Cell as vanCell,
4
+ CellGroup as vanCellGroup,
5
+ Field as vanField,
6
+ Form as vanForm,
7
+ Image as vanImage,
8
+ } from 'vant'
9
+ import { reactive, ref } from 'vue'
10
+
11
+ const props = defineProps({
12
+ jsonConfig: Object,
13
+ })
14
+
15
+ const receivedFunction = reactive([])
16
+ const contentForMobile = ref([])
17
+
18
+ function formatConfig() {
19
+ for (let i = 0; i < props.jsonConfig.content.length; i++) {
20
+ let tempObj = {
21
+ label: undefined,
22
+ value: undefined,
23
+ valueType: 'str',
24
+ }
25
+ const item = props.jsonConfig.content[i]
26
+ if (item.type === 'jsonKey') {
27
+ if (receivedFunction[i].labelFunction(props.jsonConfig).type === 'key')
28
+ tempObj.label = props.jsonConfig.data[receivedFunction[i].labelFunction(props.jsonConfig).content]
29
+ else if (receivedFunction[i].labelFunction(props.jsonConfig).type === 'value')
30
+ tempObj.label = receivedFunction[i].labelFunction(props.jsonConfig).content
31
+
32
+ if (receivedFunction[i].valueFunction(props.jsonConfig).type === 'key') {
33
+ tempObj.value = props.jsonConfig.data[receivedFunction[i].valueFunction(props.jsonConfig).content]
34
+ }
35
+ else if (receivedFunction[i].valueFunction(props.jsonConfig).type === 'value') {
36
+ tempObj.value = receivedFunction[i].valueFunction(props.jsonConfig).content
37
+ }
38
+ else if (receivedFunction[i].valueFunction(props.jsonConfig).type === 'img') {
39
+ tempObj.valueType = 'img'
40
+ tempObj.value = receivedFunction[i].valueFunction(props.jsonConfig).content
41
+ }
42
+ contentForMobile.value.push(tempObj)
43
+ tempObj = {
44
+ label: undefined,
45
+ value: undefined,
46
+ valueType: 'str',
47
+ }
48
+ }
49
+ else if (item.type === 'jsonArray') {
50
+ for (let j = 0; j < props.jsonConfig.data[item.jsonArrayDataIndex].length; j++) {
51
+ const jsonArrayItem = props.jsonConfig.data[item.jsonArrayDataIndex][j]
52
+ if (receivedFunction[i].labelFunction(props.jsonConfig, jsonArrayItem).type === 'key')
53
+ tempObj.label = jsonArrayItem[receivedFunction[i].labelFunction(props.jsonConfig, jsonArrayItem).content]
54
+ else if (receivedFunction[i].labelFunction(props.jsonConfig, jsonArrayItem).type === 'value')
55
+ tempObj.label = receivedFunction[i].labelFunction(props.jsonConfig, jsonArrayItem).content
56
+
57
+ if (receivedFunction[i].valueFunction(props.jsonConfig, jsonArrayItem).type === 'key') {
58
+ tempObj.value = jsonArrayItem[receivedFunction[i].valueFunction(props.jsonConfig, jsonArrayItem).content]
59
+ }
60
+ else if (receivedFunction[i].valueFunction(props.jsonConfig, jsonArrayItem).type === 'value') {
61
+ tempObj.value = receivedFunction[i].valueFunction(props.jsonConfig, jsonArrayItem).content
62
+ }
63
+ else if (receivedFunction[i].valueFunction(props.jsonConfig, jsonArrayItem).type === 'img') {
64
+ tempObj.valueType = 'img'
65
+ tempObj.value = receivedFunction[i].valueFunction(props.jsonConfig, jsonArrayItem).content
66
+ }
67
+
68
+ contentForMobile.value.push(tempObj)
69
+ tempObj = {
70
+ label: undefined,
71
+ value: undefined,
72
+ valueType: 'str',
73
+ }
74
+ }
75
+ }
76
+ }
77
+ }
78
+ // ------------------------- 初始化 -------------------------
79
+ initComponent()
80
+
81
+ function initComponent() {
82
+ for (let i = 0; i < props.jsonConfig.content.length; i++) {
83
+ receivedFunction.push({
84
+ // eslint-disable-next-line no-eval
85
+ labelFunction: eval(`(${props.jsonConfig.content[i].customFunctionForLabel})`),
86
+ // eslint-disable-next-line no-eval
87
+ valueFunction: eval(`(${props.jsonConfig.content[i].customFunctionForValue})`),
88
+ })
89
+ }
90
+ formatConfig()
91
+ }
92
+ </script>
93
+
94
+ <template>
95
+ <div class="main">
96
+ <!-- 标题 -->
97
+ <template v-if="jsonConfig.title">
98
+ <template v-if="jsonConfig.title.type === 'titleKey'">
99
+ <h2 class="title" v-html="jsonConfig.data[jsonConfig.title.value]" />
100
+ </template>
101
+ <template v-else-if="jsonConfig.title.type === 'titleValue'">
102
+ <h2 class="title" v-html="jsonConfig.title.value" />
103
+ </template>
104
+ </template>
105
+ <!-- 内容 -->
106
+ <van-form>
107
+ <van-cell-group inset class="cell_group">
108
+ <template v-for="(row, rowIndex) in contentForMobile" :key="rowIndex">
109
+ <template v-if="row.valueType === 'str'">
110
+ <van-cell center :title="row.label" :value="row.value ? row.value : '无'" />
111
+ </template>
112
+ <template v-else-if="row.valueType === 'img'">
113
+ <template v-for="(img, imgIndex) in row.value" :key="imgIndex">
114
+ <van-field :name="row.label" :label="row.label">
115
+ <template #input>
116
+ <div style="width: 100%;text-align: right">
117
+ <van-image :src="img" width="100" height="100" fit="cover" />
118
+ </div>
119
+ </template>
120
+ </van-field>
121
+ </template>
122
+ </template>
123
+ </template>
124
+ </van-cell-group>
125
+ </van-form>
126
+ </div>
127
+ </template>
128
+
129
+ <style scoped lang="less">
130
+ .main{
131
+ padding-top: 4vh;
132
+ width: 100vw;
133
+ height: 100vh;
134
+ background-color: #eff2f5;
135
+
136
+ .title{
137
+ padding-bottom: 2vh;
138
+ color: rgb(50, 50, 51);
139
+ text-align: center;
140
+ margin: 0 0 3vh;
141
+ }
142
+
143
+ .text_box{
144
+ margin-top: 2vh;
145
+ margin-bottom: 2vh;
146
+ }
147
+
148
+ .main_text{
149
+ padding-left: 16px;
150
+ font-weight: 400;
151
+ line-height: 1.6;
152
+ margin: 0 0 40px;
153
+ color: #969799;
154
+ font-size: 14px;
155
+ }
156
+
157
+ .show_value_item{
158
+ text-align: center;
159
+ font-size: 1.2em;
160
+ }
161
+
162
+ .cell_group{
163
+ margin-top: 2vh;
164
+ margin-bottom: 2vh;
165
+ }
166
+
167
+ .form_item{
168
+ margin-top: 2vh;
169
+ }
170
+
171
+ .button_group{
172
+ text-align: center;
173
+ margin-top: 3vh;
174
+ margin-bottom: 3vh;
175
+ }
176
+
177
+ .button_group>:first-child {
178
+ margin-right: 3vw;
179
+ }
180
+
181
+ .divider{
182
+ color: #1989fa;
183
+ border-color: #1989fa;
184
+ padding: 0 16px
185
+ }
186
+
187
+ .submit_button{
188
+ background-color: #eff2f5;
189
+ padding: 5vh;
190
+ }
191
+ }
192
+
193
+ .skeleton{
194
+ margin-top: 5vh
195
+ }
196
+ .my-cell-group{
197
+ margin: 0 0 10px 0
198
+ }
199
+ :deep(.van-collapse-item__content) {
200
+ background-color: #eff2f5;
201
+ padding: 10px 0;
202
+ }
203
+ :deep(.van-cell-group__title){
204
+ padding-top: 10px;
205
+ padding-bottom: 10px;
206
+ }
207
+ :deep(.van-field__label) {
208
+ font-weight: 600;
209
+ }
210
+ :deep(.van-cell__title) {
211
+ font-weight: 600;
212
+ }
213
+ :deep(.van-uploader__wrapper){
214
+ padding: 10px;
215
+ display: flex;
216
+ flex-wrap: wrap;
217
+ justify-content: space-between; /* 水平方向上左右分散对齐 */
218
+ align-items: center; /* 垂直方向上上下中心对齐 */
219
+ }
220
+ </style>