af-mobile-client-vue3 1.0.95 → 1.0.96

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 (113) 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 +91 -91
  9. package/eslint.config.js +9 -1
  10. package/mock/modules/user.mock.ts +152 -152
  11. package/package.json +1 -1
  12. package/public/favicon.svg +4 -4
  13. package/public/safari-pinned-tab.svg +32 -32
  14. package/scripts/verifyCommit.js +19 -19
  15. package/src/App.vue +43 -43
  16. package/src/api/user/index.ts +40 -40
  17. package/src/bootstrap.ts +18 -18
  18. package/src/components/core/App/MicroAppView.vue +3 -3
  19. package/src/components/core/NavBar/index.vue +12 -12
  20. package/src/components/core/SvgIcon/index.vue +1 -1
  21. package/src/components/core/Tabbar/index.vue +38 -38
  22. package/src/components/core/Uploader/index.vue +1 -1
  23. package/src/components/core/XGridDropOption/index.vue +151 -151
  24. package/src/components/core/XMultiSelect/index.vue +183 -183
  25. package/src/components/data/XCellDetail/index.vue +106 -106
  26. package/src/components/data/XCellList/XCellList.md +28 -28
  27. package/src/components/data/XCellList/index.vue +50 -11
  28. package/src/components/data/XCellListFilter/QrScanner/index.vue +1 -1
  29. package/src/components/data/XCellListFilter/VpnRecognition/index.vue +3 -3
  30. package/src/components/data/XCellListFilter/index.vue +160 -62
  31. package/src/components/data/XForm/index.vue +2 -2
  32. package/src/components/data/XFormGroup/index.vue +3 -3
  33. package/src/components/data/XFormItem/index.vue +25 -26
  34. package/src/components/data/XOlMap/demo.vue +209 -0
  35. package/src/components/data/XOlMap/index.vue +644 -0
  36. package/src/components/data/XReportForm/XReportFormJsonRender.vue +220 -220
  37. package/src/components/data/XReportForm/index.vue +1079 -1079
  38. package/src/components/data/XReportGrid/XAddReport/XAddReport.vue +4 -7
  39. package/src/components/data/XReportGrid/XAddReport/index.md +3 -7
  40. package/src/components/data/XReportGrid/XAddReport/index.ts +2 -2
  41. package/src/components/data/XReportGrid/XReport.vue +25 -38
  42. package/src/components/data/XReportGrid/XReportDesign.vue +46 -46
  43. package/src/components/data/XReportGrid/XReportDrawer/XReportDrawer.vue +3 -3
  44. package/src/components/data/XReportGrid/XReportDrawer/index.ts +2 -2
  45. package/src/components/data/XReportGrid/XReportJsonRender.vue +20 -7
  46. package/src/components/data/XReportGrid/XReportTrGroup.vue +4 -4
  47. package/src/components/data/XReportGrid/index.md +4 -6
  48. package/src/components/data/XSignature/index.vue +285 -285
  49. package/src/components/data/XTag/index.vue +10 -10
  50. package/src/components/layout/NormalDataLayout/index.vue +70 -70
  51. package/src/components/layout/TabBarLayout/index.vue +40 -40
  52. package/src/components.d.ts +53 -53
  53. package/src/env.d.ts +16 -16
  54. package/src/font-style/font.css +3 -3
  55. package/src/hooks/useCommon.ts +9 -9
  56. package/src/layout/GridView/index.vue +1 -1
  57. package/src/layout/PageLayout.vue +4 -4
  58. package/src/layout/SingleLayout.vue +2 -2
  59. package/src/locales/en-US.json +25 -25
  60. package/src/locales/zh-CN.json +25 -25
  61. package/src/plugins/AppData.ts +38 -38
  62. package/src/plugins/index.ts +1 -1
  63. package/src/router/guards.ts +59 -59
  64. package/src/router/index.ts +61 -60
  65. package/src/router/invoiceRoutes.ts +33 -33
  66. package/src/router/routes.ts +20 -14
  67. package/src/services/api/common.ts +109 -109
  68. package/src/services/api/manage.ts +8 -8
  69. package/src/services/restTools.ts +52 -52
  70. package/src/services/v3Api.ts +46 -35
  71. package/src/stores/modules/cachedView.ts +1 -1
  72. package/src/stores/modules/setting.ts +52 -52
  73. package/src/stores/modules/user.ts +5 -5
  74. package/src/stores/mutation-type.ts +7 -7
  75. package/src/styles/app.less +6 -1
  76. package/src/utils/Storage.ts +1 -1
  77. package/src/utils/authority-utils.ts +84 -84
  78. package/src/utils/crypto.ts +39 -39
  79. package/src/utils/http/index.ts +6 -6
  80. package/src/utils/i18n.ts +41 -41
  81. package/src/utils/indexedDB.ts +180 -180
  82. package/src/utils/mobileUtil.ts +26 -26
  83. package/src/utils/routerUtil.ts +271 -271
  84. package/src/utils/runEvalFunction.ts +13 -13
  85. package/src/utils/validate.ts +1 -1
  86. package/src/utils/wechatUtil.ts +9 -9
  87. package/src/views/chat/index.vue +1 -1
  88. package/src/views/common/LoadError.vue +64 -64
  89. package/src/views/common/NotFound.vue +68 -68
  90. package/src/views/component/EvaluateRecordView/index.vue +40 -40
  91. package/src/views/component/XCellDetailView/index.vue +217 -216
  92. package/src/views/component/XCellListView/index.vue +1 -1
  93. package/src/views/component/XFormAppraiseView/index.vue +4 -4
  94. package/src/views/component/XFormGroupView/index.vue +1 -1
  95. package/src/views/component/XFormView/index.vue +6 -7
  96. package/src/views/component/XReportFormIframeView/index.vue +47 -47
  97. package/src/views/component/XReportFormView/index.vue +13 -13
  98. package/src/views/component/XReportGridView/index.vue +2 -3
  99. package/src/views/component/XSignatureView/index.vue +50 -50
  100. package/src/views/component/index.vue +4 -4
  101. package/src/views/component/menu.vue +117 -117
  102. package/src/views/component/notice.vue +46 -46
  103. package/src/views/component/topNav.vue +36 -36
  104. package/src/views/invoiceShow/index.vue +61 -62
  105. package/src/views/user/login/ForgetPasswordForm.vue +94 -93
  106. package/src/views/user/login/LoginForm.vue +8 -7
  107. package/src/views/user/login/LoginTitle.vue +68 -68
  108. package/src/views/user/login/index.vue +22 -22
  109. package/src/views/user/my/index.vue +230 -230
  110. package/src/vue-router.d.ts +9 -9
  111. package/tsconfig.json +43 -43
  112. package/uno.config.ts +1 -1
  113. package/vite.config.ts +123 -123
@@ -1,10 +1,10 @@
1
1
  <script setup lang="ts">
2
- import { inject, provide, ref } from 'vue'
3
- import { storeToRefs } from 'pinia'
4
- import { Dialog as VanDialog, showDialog } from 'vant'
2
+ import XReport from '@af-mobile-client-vue3/components/data/XReportGrid/XReport.vue'
5
3
  import { useUserStore } from '@af-mobile-client-vue3/stores/modules/user'
6
4
  import { executeStrFunctionByContext } from '@af-mobile-client-vue3/utils/runEvalFunction'
7
- import XReport from '@af-mobile-client-vue3/components/data/XReportGrid/XReport.vue'
5
+ import { storeToRefs } from 'pinia'
6
+ import { showDialog, Dialog as VanDialog } from 'vant'
7
+ import { inject, provide, ref } from 'vue'
8
8
 
9
9
  // Props
10
10
  const props = defineProps({
@@ -96,7 +96,6 @@ function getSelectedId() {
96
96
  }
97
97
 
98
98
  function selectRow(selectedRowKeys: any[], selectedRows: any[]) {
99
- console.log('XAddReport')
100
99
  emit('selectRow', selectedRowKeys, selectedRows)
101
100
  }
102
101
 
@@ -116,7 +115,6 @@ function getComponentByName(name: string) {
116
115
 
117
116
  async function onSubmit() {
118
117
  if (mainRef.value?.config?.confirmFunction) {
119
- console.info('执行自定义确认逻辑')
120
118
  let func = mainRef.value.config.confirmFunction
121
119
  if (func && func.startsWith('function'))
122
120
  func = func.replace('function', 'async function')
@@ -162,7 +160,6 @@ async function onSubmit() {
162
160
  }
163
161
 
164
162
  function updateImg(data: any) {
165
- console.log(data)
166
163
  }
167
164
 
168
165
  // 暴露方法
@@ -2,26 +2,22 @@
2
2
 
3
3
  动态新增/修改表单控件,根据JSON配置生成一个完整的可供新增/修改数据的动态表单
4
4
 
5
-
6
5
  ## 何时使用
7
6
 
8
7
  当需要一个可供新增/修改数据的动态生成的表单时
9
8
 
10
-
11
9
  引用方式:
12
10
 
13
11
  ```javascript
14
12
  import XAddReport from '@vue2-client/base-client/components/XAddReport/XAddReport'
15
13
 
16
14
  export default {
17
- components: {
18
- XAddReport
19
- }
15
+ components: {
16
+ XAddReport
17
+ }
20
18
  }
21
19
  ```
22
20
 
23
-
24
-
25
21
  ## 代码演示
26
22
 
27
23
  ```html
@@ -6,5 +6,5 @@ export { XAddReport }
6
6
  export default {
7
7
  install(app: App) {
8
8
  app.component('XAddReport', XAddReport)
9
- }
10
- }
9
+ },
10
+ }
@@ -1,23 +1,19 @@
1
1
  <script setup lang="ts">
2
- import { computed, nextTick, onBeforeMount, onBeforeUnmount, onMounted, provide, ref, watch } from 'vue'
3
- import { storeToRefs } from 'pinia'
2
+ import XReportDesign from '@af-mobile-client-vue3/components/data/XReportGrid/XReportDesign.vue'
3
+ import { getConfigByName, runLogic } from '@af-mobile-client-vue3/services/api/common'
4
+ import { useUserStore } from '@af-mobile-client-vue3/stores/modules/user'
5
+ import { executeStrFunctionByContext } from '@af-mobile-client-vue3/utils/runEvalFunction'
4
6
  import {
7
+ showDialog,
5
8
  Button as VanButton,
6
9
  Card as VanCard,
7
- Icon as VanIcon,
8
- RadioGroup as VanRadioGroup,
9
10
  Radio as VanRadio,
11
+ RadioGroup as VanRadioGroup,
10
12
  Row as VanRow,
11
- Col as VanCol,
12
- Space as VanSpace,
13
13
  Skeleton as VanSkeleton,
14
- showDialog
14
+ Space as VanSpace,
15
15
  } from 'vant'
16
- import { getConfigByName, runLogic } from '@af-mobile-client-vue3/services/api/common'
17
- import { executeStrFunctionByContext } from '@af-mobile-client-vue3/utils/runEvalFunction'
18
- import { printElement } from '@af-mobile-client-vue3/components/data/XReportGrid/print'
19
- import XReportDesign from '@af-mobile-client-vue3/components/data/XReportGrid/XReportDesign.vue'
20
- import { useUserStore } from '@af-mobile-client-vue3/stores/modules/user'
16
+ import { computed, nextTick, onBeforeMount, onBeforeUnmount, onMounted, provide, ref, watch } from 'vue'
21
17
 
22
18
  // import HtmlToPdf from '@/utils/htmlToPDF'
23
19
 
@@ -106,7 +102,7 @@ const props = defineProps({
106
102
  })
107
103
 
108
104
  // Emits
109
- const emit = defineEmits(['updateImg', 'selectRow', 'cancel'])
105
+ const emit = defineEmits(['updateImg', 'selectRow', 'cancel', 'register'])
110
106
 
111
107
  // Store
112
108
  const userStore = useUserStore()
@@ -140,7 +136,7 @@ const widget = computed(() => props.isWidget)
140
136
  // 在provide之前定义getGlobalData函数
141
137
  const getGlobalData = () => globalData.value
142
138
 
143
- const setGlobalData = (obj: any) => {
139
+ function setGlobalData(obj: any) {
144
140
  globalData.value = obj
145
141
  }
146
142
 
@@ -168,11 +164,8 @@ function slotRendered() {
168
164
  }
169
165
 
170
166
  function registerComponent(componentName: string, component: any) {
171
- console.log('内部注册', componentName)
172
167
  if (XReportDesign.value)
173
168
  XReportDesign.value[componentName] = component
174
-
175
- console.log('内部注册完成')
176
169
  }
177
170
 
178
171
  // 数据处理方法
@@ -241,13 +234,11 @@ function transformArray(inputList: any[]) {
241
234
 
242
235
  // 组件操作方法
243
236
  function getComponentByName(componentName: string) {
244
- console.log('内部取组件', componentName)
245
237
  return XReportDesign.value?.[componentName]
246
238
  }
247
239
 
248
240
  // 对话框操作
249
241
  function openDialog(configName: string, selectedId: any, mixinData: any, outEnv = {}, attr = {}) {
250
- console.log('openDialog', configName, selectedId)
251
242
  xAddReport.value?.init({
252
243
  configName,
253
244
  selectedId,
@@ -258,7 +249,6 @@ function openDialog(configName: string, selectedId: any, mixinData: any, outEnv
258
249
  }
259
250
 
260
251
  function openDrawer(configName: string, selectedId: any, mixinData: any, outEnv = {}, attr = {}) {
261
- console.log('openDrawer', configName, selectedId)
262
252
  xReportDrawer.value?.init({
263
253
  configName,
264
254
  selectedId,
@@ -320,7 +310,6 @@ function exportPDF() {
320
310
 
321
311
  // 配置处理方法
322
312
  function configInit() {
323
- console.log('拼接完成', config.value)
324
313
  originalConfig.value = Object.assign({}, config.value)
325
314
  if (!props.dontFormat)
326
315
  formatConfigRow(config.value)
@@ -354,9 +343,7 @@ function configInit() {
354
343
  })
355
344
  })
356
345
 
357
- console.log('转换前配置', config.value)
358
346
  originalConfig.value.columns = transformArray(JSON.parse(JSON.stringify(config.value.columns)))
359
- console.log('转换后的列描述', originalConfig.value.columns)
360
347
 
361
348
  scanFinish.value = true
362
349
  }
@@ -814,6 +801,7 @@ onBeforeMount(() => {
814
801
 
815
802
  onMounted(() => {
816
803
  if (props.registerMap !== undefined) {
804
+ // eslint-disable-next-line vue/no-mutating-props
817
805
  props.registerMap.push({
818
806
  exportData,
819
807
  printDocument,
@@ -842,11 +830,11 @@ watch(() => props.configName, (val) => {
842
830
  })
843
831
 
844
832
  watch(() => props.localConfig, (val) => {
845
- if (val) {
846
- config.value = val
847
- configInit()
848
- }
849
- })
833
+ if (val) {
834
+ config.value = val
835
+ configInit()
836
+ }
837
+ })
850
838
 
851
839
  // 暴露方法
852
840
  defineExpose({
@@ -858,7 +846,6 @@ defineExpose({
858
846
 
859
847
  // 选择行方法
860
848
  function selectRow(selectedRowKeys: any[], selectedRows: any[]) {
861
- console.log('XReport selectRow')
862
849
  emit('selectRow', selectedRowKeys, selectedRows)
863
850
  }
864
851
  </script>
@@ -873,17 +860,14 @@ function selectRow(selectedRowKeys: any[], selectedRows: any[]) {
873
860
  <!-- 主体表格 -->
874
861
  <XReportDesign
875
862
  v-if="scanFinish"
863
+ ref="XReportDesign"
876
864
  :show-img-in-cell="showImgInCell"
877
865
  :img-prefix="imgPrefix"
878
866
  :use-oss-for-img="useOssForImg"
879
867
  :display-only="displayOnly"
880
868
  :config="type === 'display' ? originalConfig : activeConfig"
881
869
  :slot-config-name="type === 'display' ? undefined : activatedSlotName"
882
- @update-img="updateImg"
883
870
  :for-display="type === 'display'"
884
- @select-row="selectRow"
885
- ref="XReportDesign"
886
- @slotRendered="slotRendered"
887
871
  :server-name="serverName"
888
872
  :env="env"
889
873
  :show-title="showTitle"
@@ -891,6 +875,9 @@ function selectRow(selectedRowKeys: any[], selectedRows: any[]) {
891
875
  :no-top-border="noTopBorder"
892
876
  :show-images="hasImages"
893
877
  :image-list="imageList"
878
+ @update-img="updateImg"
879
+ @select-row="selectRow"
880
+ @slot-rendered="slotRendered"
894
881
  />
895
882
 
896
883
  <VanRow v-if="showSaveButton" type="flex" justify="end">
@@ -926,6 +913,7 @@ function selectRow(selectedRowKeys: any[], selectedRows: any[]) {
926
913
  <!-- 主体表格 -->
927
914
  <XReportDesign
928
915
  v-if="scanFinish"
916
+ ref="XReportDesign"
929
917
  :show-img-in-cell="showImgInCell"
930
918
  :img-prefix="imgPrefix"
931
919
  :use-oss-for-img="useOssForImg"
@@ -933,17 +921,16 @@ function selectRow(selectedRowKeys: any[], selectedRows: any[]) {
933
921
  :config="type === 'display' ? originalConfig : activeConfig"
934
922
  :slot-config-name="type === 'display' ? undefined : activatedSlotName"
935
923
  :for-display="type === 'display'"
936
- @update-img="updateImg"
937
924
  :no-padding="noPadding"
938
- @select-row="selectRow"
939
925
  :no-top-border="noTopBorder"
940
- @slotRendered="slotRendered"
941
926
  :show-title="showTitle"
942
- ref="XReportDesign"
943
927
  :server-name="serverName"
944
928
  :env="env"
945
929
  :show-images="hasImages"
946
930
  :image-list="imageList"
931
+ @update-img="updateImg"
932
+ @select-row="selectRow"
933
+ @slot-rendered="slotRendered"
947
934
  />
948
935
  </div>
949
936
  </template>
@@ -952,7 +939,7 @@ function selectRow(selectedRowKeys: any[], selectedRows: any[]) {
952
939
  <!-- <x-add-report
953
940
  ref="xAddReport"
954
941
  :env="env"
955
- />-->
942
+ /> -->
956
943
  <!-- 弹出框 -->
957
944
  <!-- <x-report-drawer
958
945
  ref="xReportDrawer"
@@ -1,9 +1,9 @@
1
1
  <script setup lang="ts">
2
- import { computed, onMounted, ref, watch } from 'vue'
3
-
4
2
  import { getConfigByName } from '@af-mobile-client-vue3/services/api/common'
5
- import XReportTrGroup from './XReportTrGroup.vue'
3
+
4
+ import { computed, onMounted, ref, watch } from 'vue'
6
5
  import XReportJsonRender from './XReportJsonRender.vue'
6
+ import XReportTrGroup from './XReportTrGroup.vue'
7
7
 
8
8
  // Props 类型定义
9
9
  interface Props {
@@ -128,6 +128,7 @@ onMounted(() => {
128
128
  getConfigByName(props.slotConfigName, (res: any) => {
129
129
  slotConfig.value = res
130
130
  res.data = { ...res.data, ...data.value }
131
+ // eslint-disable-next-line vue/no-mutating-props
131
132
  props.config.data = res.data
132
133
  activatedConfig.value = res
133
134
  render.value = true
@@ -179,54 +180,53 @@ watch(() => activatedConfig.value, (val) => {
179
180
  <!-- 插槽展示 -->
180
181
  <template v-if="row[0].type === 'slot'">
181
182
  <XReportTrGroup
183
+ :key="rowIndex"
182
184
  :show-img-in-cell="showImgInCell"
183
185
  :img-prefix="imgPrefix"
184
186
  :server-name="serverName"
185
187
  :env="env"
186
- :key="rowIndex"
187
188
  :use-oss-for-img="useOssForImg"
188
189
  :columns="row"
189
- @update-img="updateImg"
190
190
  :no-top-border="noTopBorder"
191
- @selectRow="selectRow"
192
191
  :config-data="activatedConfig.data"
193
192
  :config="activatedConfig"
194
193
  :display="true"
194
+ @update-img="updateImg"
195
+ @select-row="selectRow"
195
196
  />
196
197
  </template>
197
198
  <!-- 普通行 -->
198
199
  <template v-else>
199
200
  <template v-if="!forDisplay">
200
201
  <XReportTrGroup
202
+ :key="rowIndex"
201
203
  :show-img-in-cell="showImgInCell"
202
204
  :img-prefix="imgPrefix"
203
205
  :server-name="serverName"
204
206
  :env="env"
205
- :key="rowIndex"
206
207
  :use-oss-for-img="useOssForImg"
207
208
  :columns="row"
208
- @update-img="updateImg"
209
209
  :no-top-border="noTopBorder"
210
- @selectRow="selectRow"
211
210
  :config-data="activatedConfig.data"
212
211
  :config="activatedConfig"
212
+ @update-img="updateImg"
213
213
  />
214
214
  </template>
215
215
  <template v-else>
216
216
  <XReportTrGroup
217
+ :key="rowIndex"
217
218
  :show-img-in-cell="showImgInCell"
218
219
  :img-prefix="imgPrefix"
219
220
  :server-name="serverName"
220
221
  :env="env"
221
222
  :use-oss-for-img="useOssForImg"
222
223
  :config="activatedConfig"
223
- :key="rowIndex"
224
- @update-img="updateImg"
225
224
  :columns="row"
226
- @selectRow="selectRow"
227
225
  :no-top-border="noTopBorder"
228
226
  :config-data="activatedConfig.data"
229
227
  :display="true"
228
+ @update-img="updateImg"
229
+ @select-row="selectRow"
230
230
  />
231
231
  </template>
232
232
  </template>
@@ -270,20 +270,20 @@ watch(() => activatedConfig.value, (val) => {
270
270
  <!-- 插槽展示 -->
271
271
  <template v-if="row[0].type === 'slot'">
272
272
  <XReportTrGroup
273
+ :key="rowIndex"
273
274
  :show-img-in-cell="showImgInCell"
274
275
  :img-prefix="imgPrefix"
275
276
  :server-name="serverName"
276
277
  :env="env"
277
278
  :use-oss-for-img="useOssForImg"
278
- @update-img="updateImg"
279
- :key="rowIndex"
280
- @select-row="selectRow"
281
279
  :columns="row"
282
- @slot-rendered="slotRendered"
283
280
  :no-top-border="noTopBorder"
284
281
  :config-data="activatedConfig.data"
285
282
  :config="activatedConfig"
286
283
  :display="true"
284
+ @update-img="updateImg"
285
+ @select-row="selectRow"
286
+ @slot-rendered="slotRendered"
287
287
  />
288
288
  </template>
289
289
  <!-- 列表 list -->
@@ -291,39 +291,39 @@ watch(() => activatedConfig.value, (val) => {
291
291
  <template v-for="(num, listIndex) in row[0].listLength + 1">
292
292
  <template v-if="!forDisplay">
293
293
  <XReportTrGroup
294
+ :key="rowIndex + listIndex"
294
295
  :show-img-in-cell="showImgInCell"
295
296
  :img-prefix="imgPrefix"
296
297
  :server-name="serverName"
297
298
  :env="env"
298
299
  :use-oss-for-img="useOssForImg"
299
- @slot-rendered="slotRendered"
300
300
  :config="activatedConfig"
301
- @update-img="updateImg"
302
- :key="rowIndex + listIndex"
303
- @select-row="selectRow"
304
301
  :columns="row"
305
302
  :no-top-border="noTopBorder"
306
303
  :config-data="activatedConfig.data"
307
304
  :list-index="listIndex"
305
+ @slot-rendered="slotRendered"
306
+ @update-img="updateImg"
307
+ @select-row="selectRow"
308
308
  />
309
309
  </template>
310
310
  <template v-else>
311
311
  <XReportTrGroup
312
+ :key="rowIndex + listIndex"
312
313
  :show-img-in-cell="showImgInCell"
313
314
  :img-prefix="imgPrefix"
314
315
  :server-name="serverName"
315
316
  :env="env"
316
317
  :use-oss-for-img="useOssForImg"
317
- @slot-rendered="slotRendered"
318
318
  :config="activatedConfig"
319
- @update-img="updateImg"
320
- :key="rowIndex + listIndex"
321
- @select-row="selectRow"
322
319
  :columns="row"
323
320
  :no-top-border="noTopBorder"
324
321
  :config-data="activatedConfig.data"
325
322
  :list-index="listIndex"
326
323
  :display="true"
324
+ @slot-rendered="slotRendered"
325
+ @update-img="updateImg"
326
+ @select-row="selectRow"
327
327
  />
328
328
  </template>
329
329
  </template>
@@ -332,61 +332,61 @@ watch(() => activatedConfig.value, (val) => {
332
332
  <template v-else-if="row[0].type === 'inputColumns'">
333
333
  <template v-if="forDisplay">
334
334
  <XReportTrGroup
335
+ v-for="(item, definitionIndex) in activatedConfig.data[row[0].dataIndex]"
336
+ :key="row[0].dataIndex + definitionIndex + rowIndex"
335
337
  :show-img-in-cell="showImgInCell"
336
338
  :img-prefix="imgPrefix"
337
339
  :server-name="serverName"
338
340
  :env="env"
339
341
  :use-oss-for-img="useOssForImg"
340
- @slot-rendered="slotRendered"
341
342
  :config="activatedConfig"
342
- @update-img="updateImg"
343
343
  :columns="row[0].definition"
344
- @select-row="selectRow"
345
344
  :config-data="{ arr: activatedConfig.data[row[0].dataIndex] }"
346
345
  :input-columns="true"
347
346
  :no-top-border="noTopBorder"
348
- v-for="(item, definitionIndex) in activatedConfig.data[row[0].dataIndex]"
349
347
  :input-columns-definition-index="definitionIndex"
350
348
  :display="true"
351
- :key="row[0].dataIndex + definitionIndex + rowIndex"
349
+ @slot-rendered="slotRendered"
350
+ @update-img="updateImg"
351
+ @select-row="selectRow"
352
352
  />
353
353
  </template>
354
354
  <template v-if="!forDisplay">
355
355
  <XReportTrGroup
356
+ v-for="(item, definitionIndex) in activatedConfig.data[row[0].dataIndex]"
357
+ :key="row[0].dataIndex + definitionIndex + rowIndex"
356
358
  :show-img-in-cell="showImgInCell"
357
359
  :img-prefix="imgPrefix"
358
360
  :server-name="serverName"
359
361
  :env="env"
360
362
  :use-oss-for-img="useOssForImg"
361
- @slot-rendered="slotRendered"
362
363
  :config="activatedConfig"
363
- @update-img="updateImg"
364
364
  :columns="row[0].definition"
365
- @select-row="selectRow"
366
365
  :config-data="{ arr: activatedConfig.data[row[0].dataIndex] }"
367
366
  :input-columns="true"
368
367
  :no-top-border="noTopBorder"
369
- v-for="(item, definitionIndex) in activatedConfig.data[row[0].dataIndex]"
370
368
  :input-columns-definition-index="definitionIndex"
371
- :key="row[0].dataIndex + definitionIndex + rowIndex"
369
+ @slot-rendered="slotRendered"
370
+ @update-img="updateImg"
371
+ @select-row="selectRow"
372
372
  />
373
373
  <!-- 动态行交互按钮 -->
374
374
  <XReportTrGroup
375
+ :key="rowIndex"
375
376
  :show-img-in-cell="showImgInCell"
376
377
  :img-prefix="imgPrefix"
377
378
  :server-name="serverName"
378
379
  :env="env"
379
380
  :use-oss-for-img="useOssForImg"
380
- @slot-rendered="slotRendered"
381
381
  :config="activatedConfig"
382
- @update-img="updateImg"
383
- :key="rowIndex"
384
- @select-row="selectRow"
385
382
  :columns="row"
386
383
  :no-top-border="noTopBorder"
387
384
  :config-data="activatedConfig.data"
388
385
  :input-columns-button="true"
389
386
  :input-columns="true"
387
+ @slot-rendered="slotRendered"
388
+ @update-img="updateImg"
389
+ @select-row="selectRow"
390
390
  />
391
391
  </template>
392
392
  </template>
@@ -394,37 +394,37 @@ watch(() => activatedConfig.value, (val) => {
394
394
  <template v-else>
395
395
  <template v-if="!forDisplay">
396
396
  <XReportTrGroup
397
+ :key="rowIndex"
397
398
  :show-img-in-cell="showImgInCell"
398
399
  :img-prefix="imgPrefix"
399
400
  :server-name="serverName"
400
401
  :env="env"
401
402
  :use-oss-for-img="useOssForImg"
402
- @slot-rendered="slotRendered"
403
- :key="rowIndex"
404
- @update-img="updateImg"
405
403
  :columns="row"
406
- @select-row="selectRow"
407
404
  :no-top-border="noTopBorder"
408
405
  :config-data="activatedConfig.data"
409
406
  :config="activatedConfig"
407
+ @slot-rendered="slotRendered"
408
+ @update-img="updateImg"
409
+ @select-row="selectRow"
410
410
  />
411
411
  </template>
412
412
  <template v-else>
413
413
  <XReportTrGroup
414
+ :key="rowIndex"
414
415
  :show-img-in-cell="showImgInCell"
415
416
  :img-prefix="imgPrefix"
416
417
  :server-name="serverName"
417
418
  :env="env"
418
419
  :use-oss-for-img="useOssForImg"
419
- @slot-rendered="slotRendered"
420
420
  :config="activatedConfig"
421
- @update-img="updateImg"
422
- :key="rowIndex"
423
- @select-row="selectRow"
424
421
  :columns="row"
425
422
  :no-top-border="noTopBorder"
426
423
  :config-data="activatedConfig.data"
427
424
  :display="true"
425
+ @slot-rendered="slotRendered"
426
+ @update-img="updateImg"
427
+ @select-row="selectRow"
428
428
  />
429
429
  </template>
430
430
  </template>
@@ -1,9 +1,9 @@
1
1
  <script setup lang="ts">
2
- import { inject, provide, ref } from 'vue'
3
- import { storeToRefs } from 'pinia'
4
- import { Popup as VanPopup } from 'vant'
5
2
  import XReport from '@af-mobile-client-vue3/components/data/XReportGrid/XReport.vue'
6
3
  import { useUserStore } from '@af-mobile-client-vue3/stores/modules/user'
4
+ import { storeToRefs } from 'pinia'
5
+ import { Popup as VanPopup } from 'vant'
6
+ import { inject, provide, ref } from 'vue'
7
7
 
8
8
  // Props
9
9
  const props = defineProps({
@@ -6,5 +6,5 @@ export { XReportDrawer }
6
6
  export default {
7
7
  install(app: App) {
8
8
  app.component('XReportDrawer', XReportDrawer)
9
- }
10
- }
9
+ },
10
+ }
@@ -1,8 +1,8 @@
1
1
  <script setup lang="ts">
2
- import { onBeforeMount, ref } from 'vue'
3
2
  import type { Ref } from 'vue'
4
- import { Dialog as VanDialog } from 'vant'
5
3
  import Upload from '@af-mobile-client-vue3/components/core/Uploader/index.vue'
4
+ import { Dialog as VanDialog } from 'vant'
5
+ import { onBeforeMount, ref } from 'vue'
6
6
 
7
7
  interface JsonRenderConfig {
8
8
  data: Record<string, any>
@@ -54,6 +54,7 @@ const props = defineProps({
54
54
  // Emits
55
55
  const emit = defineEmits<{
56
56
  (e: 'updateImg', data: any): void
57
+ (e: 'update:config', config: JsonRenderConfig): void
57
58
  }>()
58
59
 
59
60
  // 状态
@@ -166,7 +167,7 @@ onBeforeMount(() => {
166
167
  </script>
167
168
 
168
169
  <template>
169
- <div :class="noPadding ? 'reportMainNoPadding' : 'reportMain'" id="xreportjsonrender">
170
+ <div id="xreportjsonrender" :class="noPadding ? 'reportMainNoPadding' : 'reportMain'">
170
171
  <table class="reportTable" :style="config.style ? config.style : ''">
171
172
  <tbody class="'reportTable'">
172
173
  <!-- 标题 -->
@@ -213,10 +214,16 @@ onBeforeMount(() => {
213
214
  </template>
214
215
  <template v-else>
215
216
  <template v-if="receivedFunction[rowIndex].valueFunction(config).originalKey">
216
- <van-input v-model="config.data[receivedFunction[rowIndex].valueFunction(config).originalKey]" />
217
+ <van-input
218
+ :value="config.data[receivedFunction[rowIndex].valueFunction(config).originalKey]"
219
+ @input="(val) => emit('update:config', { ...config, data: { ...config.data, [receivedFunction[rowIndex].valueFunction(config).originalKey]: val } })"
220
+ />
217
221
  </template>
218
222
  <template v-else>
219
- <van-input v-model="config.data[receivedFunction[rowIndex].valueFunction(config).content]" />
223
+ <van-input
224
+ :value="config.data[receivedFunction[rowIndex].valueFunction(config).content]"
225
+ @input="(val) => emit('update:config', { ...config, data: { ...config.data, [receivedFunction[rowIndex].valueFunction(config).content]: val } })"
226
+ />
220
227
  </template>
221
228
  </template>
222
229
  <template v-if="receivedFunction[rowIndex].valueFunction(config).type === 'img'">
@@ -297,11 +304,17 @@ onBeforeMount(() => {
297
304
  />
298
305
  </template>
299
306
  <template v-else>
300
- <van-input v-model="item[receivedFunction[rowIndex].valueFunction(config, item).originalKey]" />
307
+ <van-input
308
+ :value="item[receivedFunction[rowIndex].valueFunction(config, item).originalKey]"
309
+ @input="(val) => emit('update:config', { ...config, data: { ...config.data, [receivedFunction[rowIndex].valueFunction(config, item).originalKey]: val } })"
310
+ />
301
311
  </template>
302
312
  </template>
303
313
  <template v-else>
304
- <van-input v-model="item[receivedFunction[rowIndex].valueFunction(config, item).content]" />
314
+ <van-input
315
+ :value="item[receivedFunction[rowIndex].valueFunction(config, item).content]"
316
+ @input="(val) => emit('update:config', { ...config, data: { ...config.data, [receivedFunction[rowIndex].valueFunction(config, item).content]: val } })"
317
+ />
305
318
  </template>
306
319
  </template>
307
320
  </td>
@@ -1,13 +1,13 @@
1
1
  <script setup lang="ts">
2
- import { computed, defineAsyncComponent, inject, nextTick, onBeforeMount, ref, watch } from 'vue'
2
+ // import { getRealKeyData } from '@af-mobile-client-vue3/utils/util'
3
+ import { executeStrFunctionByContext } from '@af-mobile-client-vue3/utils/runEvalFunction'
3
4
  import {
5
+ showDialog,
4
6
  Col as VanCol,
5
7
  Row as VanRow,
6
- showDialog,
7
8
  } from 'vant'
8
9
 
9
- // import { getRealKeyData } from '@af-mobile-client-vue3/utils/util'
10
- import { executeStrFunctionByContext } from '@af-mobile-client-vue3/utils/runEvalFunction'
10
+ import { computed, defineAsyncComponent, inject, nextTick, onBeforeMount, ref, watch } from 'vue'
11
11
 
12
12
  const props = withDefaults(defineProps<Props>(), {
13
13
  showImgInCell: false,