vue2-client 1.5.18 → 1.5.19

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.
package/CHANGELOG.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Change Log
2
2
  > 所有关于本项目的变化都在该文档里。
3
3
 
4
- **1.5.14 - 1.5.18 -2022-12-12 @苗艳强**
4
+ **1.5.14 - 1.5.19 -2022-12-12 @苗艳强**
5
5
  - 修复徽标显示问题
6
6
  - 修复fixedQueryForm问题
7
7
  - 修复修改时树形选择框不能回填问题
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.5.18",
3
+ "version": "1.5.19",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -29,7 +29,7 @@
29
29
  :xl="12"
30
30
  :xxl="8"
31
31
  mode="新增/修改"
32
- :get-data-append-params="getDataAppendParams"
32
+ :get-data-params="getDataParams"
33
33
  />
34
34
  </a-row>
35
35
  </a-form-model>
@@ -49,7 +49,7 @@ export default {
49
49
  },
50
50
  props: {
51
51
  // 调用logic获取数据源的追加参数
52
- getDataAppendParams: {
52
+ getDataParams: {
53
53
  type: Object,
54
54
  default: undefined
55
55
  }
@@ -47,7 +47,7 @@ export default {
47
47
  | modifyModelData | 修改操作前查询出的业务数据 | Object | {} |
48
48
  | loading | 新增或修改业务是否执行中 | Boolean | false |
49
49
  | fixedAddForm | 固定新增表单,会和新增表单合并 | Object | {} |
50
- | getDataAppendParams | 调用logic获取数据源的追加参数 | Object | - |
50
+ | getDataParams | 调用logic获取数据源的追加参数 | Object | - |
51
51
  | @onSubmit | 表单的提交事件 | event | - |
52
52
 
53
53
  ## 例子1
@@ -14,7 +14,7 @@
14
14
  :attr="item"
15
15
  :form="form"
16
16
  :service-name="serviceName"
17
- :get-data-append-params="getDataAppendParams"
17
+ :get-data-params="getDataParams"
18
18
  />
19
19
  <a-drawer
20
20
  :get-container="() => {return $refs.drawerContainer}"
@@ -32,7 +32,7 @@
32
32
  :attr="item"
33
33
  :form="form"
34
34
  :service-name="serviceName"
35
- :get-data-append-params="getDataAppendParams"
35
+ :get-data-params="getDataParams"
36
36
  />
37
37
  </a-form-model>
38
38
  </a-drawer>
@@ -68,7 +68,7 @@ export default {
68
68
  },
69
69
  props: {
70
70
  // 调用logic获取数据源的追加参数
71
- getDataAppendParams: {
71
+ getDataParams: {
72
72
  type: Object,
73
73
  default: undefined
74
74
  }
@@ -374,7 +374,7 @@ export default {
374
374
  default: 'af-system'
375
375
  },
376
376
  // 调用logic获取数据源的追加参数
377
- getDataAppendParams: {
377
+ getDataParams: {
378
378
  type: Object,
379
379
  default: undefined
380
380
  }
@@ -442,8 +442,10 @@ export default {
442
442
  if (value !== '') {
443
443
  const logicName = this.attr.keyName
444
444
  const logic = logicName.substring(6)
445
- if (this.getDataAppendParams && this.getDataAppendParams[logic]) {
446
- Object.assign(value, this.getDataAppendParams[logic])
445
+ const field = this.attr.model.replace('_', '.')
446
+ // 调用logic前设置参数
447
+ if (this.getDataParams && this.getDataParams[field]) {
448
+ Object.assign(value, this.getDataParams[field])
447
449
  }
448
450
  post('/api/' + this.serviceName + '/logic/' + logic, value).then(res => {
449
451
  callback(res)
@@ -38,7 +38,7 @@ export default {
38
38
  |-----------|--------------------------|---------|------|
39
39
  | jsonData | JSON配置,根据[工具>查询配置生成]功能生成 | Object | {} |
40
40
  | isExports | 是否显示导出按钮 | Boolean | true |
41
- | getDataAppendParams | 调用logic获取数据源的追加参数 | Object | - |
41
+ | getDataParams | 调用logic获取数据源的追加参数 | Object | - |
42
42
  | @onSubmit | 表单的提交事件 | event | - |
43
43
 
44
44
  ## 例子1
@@ -4,12 +4,12 @@
4
4
  <div v-show="!loading">
5
5
  <x-add-form
6
6
  ref="xAddForm"
7
- :get-data-append-params="getDataAppendParams"
7
+ :get-data-params="getDataParams"
8
8
  @onSubmit="onAddOrEditSubmit"
9
9
  />
10
10
  <x-form
11
11
  ref="xForm"
12
- :get-data-append-params="getDataAppendParams"
12
+ :get-data-params="getDataParams"
13
13
  style="margin-bottom: 14px;"
14
14
  @onSubmit="onSearchSubmit">
15
15
  <slot name="formBtnExpand"></slot>
@@ -129,7 +129,7 @@ export default {
129
129
  default: true
130
130
  },
131
131
  // 调用logic获取数据源的追加参数
132
- getDataAppendParams: {
132
+ getDataParams: {
133
133
  type: Object,
134
134
  default: undefined
135
135
  }
@@ -44,7 +44,7 @@ export default {
44
44
  | fixedAddForm | 固定新增表单,会和新增表单合并 | Object | {} |
45
45
  | isExports | 是否显示导出按钮 | Boolean | true |
46
46
  | viewMode | 是否为预览模式 | Boolean | false |
47
- | getDataAppendParams | 调用logic获取数据源的追加参数 | Object | - |
47
+ | getDataParams | 调用logic获取数据源的追加参数 | Object | - |
48
48
  | @action | 表格详情列的单击事件 | event | - |
49
49
  | @afterSubmit | 增改提交后的回调方法 | event | - |
50
50
  | @afterDelete | 删除提交后的回调方法 | event | - |