vue2-client 1.5.16 → 1.5.18
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 +4 -1
- package/package.json +1 -1
- package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +13 -13
- package/src/base-client/components/common/XAddForm/XAddForm.vue +8 -0
- package/src/base-client/components/common/XAddForm/index.md +1 -0
- package/src/base-client/components/common/XForm/XForm.vue +9 -0
- package/src/base-client/components/common/XForm/XFormItem.vue +8 -0
- package/src/base-client/components/common/XForm/index.md +1 -0
- package/src/base-client/components/common/XFormTable/XFormTable.vue +7 -0
- package/src/base-client/components/common/XFormTable/index.md +1 -0
- package/src/config/CreateQueryConfig.js +5 -5
- package/src/utils/indexedDB.js +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
> 所有关于本项目的变化都在该文档里。
|
|
3
3
|
|
|
4
|
-
**1.5.14 - 1.5.
|
|
4
|
+
**1.5.14 - 1.5.18 -2022-12-12 @苗艳强**
|
|
5
5
|
- 修复徽标显示问题
|
|
6
6
|
- 修复fixedQueryForm问题
|
|
7
7
|
- 修复修改时树形选择框不能回填问题
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
- 修复表单不显示问题
|
|
11
11
|
- afterQuery事件增加查询条件参数
|
|
12
12
|
- 修复跳转登录页面问题
|
|
13
|
+
- 修改查询配置
|
|
14
|
+
- 修复清空查询缓存回调问题
|
|
15
|
+
- 新增调用logic获取数据源可自定义追加参数
|
|
13
16
|
|
|
14
17
|
**1.5.11 - 1.5.13 -2022-12-05 @江超**
|
|
15
18
|
- 优化了查询配置生成界面的样式
|
package/package.json
CHANGED
|
@@ -54,25 +54,25 @@
|
|
|
54
54
|
</a-card>
|
|
55
55
|
</a-col>
|
|
56
56
|
<a-col :span="9">
|
|
57
|
-
<a-card v-if="dataMode.queryForm || dataMode.addOrEditForm || dataMode.table" :bodyStyle="bodyStyle" title="核心配置">
|
|
58
|
-
<template v-if="dataMode.queryForm || dataMode.addOrEditForm">
|
|
57
|
+
<a-card v-if="dataMode.queryForm || dataMode.addOrEditForm || dataMode.table || dataMode.sqlQueryCondition" :bodyStyle="bodyStyle" title="核心配置">
|
|
58
|
+
<template v-if="dataMode.queryForm || dataMode.addOrEditForm || dataMode.sqlQueryCondition">
|
|
59
59
|
<a-divider style="font-size: 14px;margin-top: 0">表单配置</a-divider>
|
|
60
60
|
<a-form-model-item label="表单类型" prop="formType">
|
|
61
61
|
<a-select v-model="item.formType" placeholder="请选择表单类型" @change="changeFormType(item)">
|
|
62
62
|
<a-select-option v-for="formTypeItem in formType" :key="formTypeItem.key">{{ formTypeItem.label }}</a-select-option>
|
|
63
63
|
</a-select>
|
|
64
64
|
</a-form-model-item>
|
|
65
|
+
<a-form-model-item v-if="dataMode.sqlQueryCondition && item.formType !=='file' && item.formType !=='image' " label="表单查询方式" prop="queryType">
|
|
66
|
+
<a-select
|
|
67
|
+
v-model="item.queryType"
|
|
68
|
+
:disabled="formQueryTypeDisabled"
|
|
69
|
+
:getPopupContainer=" triggerNode => { return triggerNode.parentNode } "
|
|
70
|
+
placeholder="表单查询方式">
|
|
71
|
+
<a-select-option v-for="queryTypeItem in queryTypeV" :key="queryTypeItem.key">{{ queryTypeItem.label }}</a-select-option>
|
|
72
|
+
</a-select>
|
|
73
|
+
</a-form-model-item>
|
|
65
74
|
<template v-if="item.formType">
|
|
66
|
-
<a-form-model-item v-if="dataMode.
|
|
67
|
-
<a-select
|
|
68
|
-
v-model="item.queryType"
|
|
69
|
-
:disabled="formQueryTypeDisabled"
|
|
70
|
-
:getPopupContainer=" triggerNode => { return triggerNode.parentNode } "
|
|
71
|
-
placeholder="表单查询方式">
|
|
72
|
-
<a-select-option v-for="queryTypeItem in queryTypeV" :key="queryTypeItem.key">{{ queryTypeItem.label }}</a-select-option>
|
|
73
|
-
</a-select>
|
|
74
|
-
</a-form-model-item>
|
|
75
|
-
<a-form-model-item v-if="dataMode.addOrEditForm" label="表单校验" prop="rule">
|
|
75
|
+
<a-form-model-item v-if="dataMode.addOrEditForm || dataMode.queryForm" label="表单校验" prop="rule">
|
|
76
76
|
<a-row :gutter="16">
|
|
77
77
|
<a-col v-if="(item.formType === 'input' || item.formType === 'textarea' ) && item.formType !=='file' && item.formType !=='image' " :span="12" >
|
|
78
78
|
<a-select v-model="item.rule.type" :getPopupContainer=" triggerNode => { return triggerNode.parentNode } " placeholder="校验类型">
|
|
@@ -628,7 +628,7 @@ export default {
|
|
|
628
628
|
},
|
|
629
629
|
itemHandle () {
|
|
630
630
|
// 查询表单项或者新增/修改表单项
|
|
631
|
-
if (this.dataMode.queryForm || this.dataMode.addOrEditForm) {
|
|
631
|
+
if (this.dataMode.queryForm || this.dataMode.addOrEditForm || this.dataMode.sqlQueryCondition) {
|
|
632
632
|
if (!this.dataMode.sqlQueryItem || !this.dataMode.addOrEditForm) {
|
|
633
633
|
this.delKey(this.item, 'addOrEdit', 'silencePurpose', 'silenceSource')
|
|
634
634
|
}
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
:xl="12"
|
|
30
30
|
:xxl="8"
|
|
31
31
|
mode="新增/修改"
|
|
32
|
+
:get-data-append-params="getDataAppendParams"
|
|
32
33
|
/>
|
|
33
34
|
</a-row>
|
|
34
35
|
</a-form-model>
|
|
@@ -46,6 +47,13 @@ export default {
|
|
|
46
47
|
components: {
|
|
47
48
|
XFormItem
|
|
48
49
|
},
|
|
50
|
+
props: {
|
|
51
|
+
// 调用logic获取数据源的追加参数
|
|
52
|
+
getDataAppendParams: {
|
|
53
|
+
type: Object,
|
|
54
|
+
default: undefined
|
|
55
|
+
}
|
|
56
|
+
},
|
|
49
57
|
data () {
|
|
50
58
|
return {
|
|
51
59
|
// 预览模式
|
|
@@ -47,6 +47,7 @@ export default {
|
|
|
47
47
|
| modifyModelData | 修改操作前查询出的业务数据 | Object | {} |
|
|
48
48
|
| loading | 新增或修改业务是否执行中 | Boolean | false |
|
|
49
49
|
| fixedAddForm | 固定新增表单,会和新增表单合并 | Object | {} |
|
|
50
|
+
| getDataAppendParams | 调用logic获取数据源的追加参数 | Object | - |
|
|
50
51
|
| @onSubmit | 表单的提交事件 | event | - |
|
|
51
52
|
|
|
52
53
|
## 例子1
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
:attr="item"
|
|
15
15
|
:form="form"
|
|
16
16
|
:service-name="serviceName"
|
|
17
|
+
:get-data-append-params="getDataAppendParams"
|
|
17
18
|
/>
|
|
18
19
|
<a-drawer
|
|
19
20
|
:get-container="() => {return $refs.drawerContainer}"
|
|
@@ -31,6 +32,7 @@
|
|
|
31
32
|
:attr="item"
|
|
32
33
|
:form="form"
|
|
33
34
|
:service-name="serviceName"
|
|
35
|
+
:get-data-append-params="getDataAppendParams"
|
|
34
36
|
/>
|
|
35
37
|
</a-form-model>
|
|
36
38
|
</a-drawer>
|
|
@@ -64,6 +66,13 @@ export default {
|
|
|
64
66
|
components: {
|
|
65
67
|
XFormItem
|
|
66
68
|
},
|
|
69
|
+
props: {
|
|
70
|
+
// 调用logic获取数据源的追加参数
|
|
71
|
+
getDataAppendParams: {
|
|
72
|
+
type: Object,
|
|
73
|
+
default: undefined
|
|
74
|
+
}
|
|
75
|
+
},
|
|
67
76
|
data () {
|
|
68
77
|
return {
|
|
69
78
|
// 内容加载是否完成
|
|
@@ -372,6 +372,11 @@ export default {
|
|
|
372
372
|
serviceName: {
|
|
373
373
|
type: String,
|
|
374
374
|
default: 'af-system'
|
|
375
|
+
},
|
|
376
|
+
// 调用logic获取数据源的追加参数
|
|
377
|
+
getDataAppendParams: {
|
|
378
|
+
type: Object,
|
|
379
|
+
default: undefined
|
|
375
380
|
}
|
|
376
381
|
},
|
|
377
382
|
created () {
|
|
@@ -437,6 +442,9 @@ export default {
|
|
|
437
442
|
if (value !== '') {
|
|
438
443
|
const logicName = this.attr.keyName
|
|
439
444
|
const logic = logicName.substring(6)
|
|
445
|
+
if (this.getDataAppendParams && this.getDataAppendParams[logic]) {
|
|
446
|
+
Object.assign(value, this.getDataAppendParams[logic])
|
|
447
|
+
}
|
|
440
448
|
post('/api/' + this.serviceName + '/logic/' + logic, value).then(res => {
|
|
441
449
|
callback(res)
|
|
442
450
|
})
|
|
@@ -38,6 +38,7 @@ export default {
|
|
|
38
38
|
|-----------|--------------------------|---------|------|
|
|
39
39
|
| jsonData | JSON配置,根据[工具>查询配置生成]功能生成 | Object | {} |
|
|
40
40
|
| isExports | 是否显示导出按钮 | Boolean | true |
|
|
41
|
+
| getDataAppendParams | 调用logic获取数据源的追加参数 | Object | - |
|
|
41
42
|
| @onSubmit | 表单的提交事件 | event | - |
|
|
42
43
|
|
|
43
44
|
## 例子1
|
|
@@ -4,10 +4,12 @@
|
|
|
4
4
|
<div v-show="!loading">
|
|
5
5
|
<x-add-form
|
|
6
6
|
ref="xAddForm"
|
|
7
|
+
:get-data-append-params="getDataAppendParams"
|
|
7
8
|
@onSubmit="onAddOrEditSubmit"
|
|
8
9
|
/>
|
|
9
10
|
<x-form
|
|
10
11
|
ref="xForm"
|
|
12
|
+
:get-data-append-params="getDataAppendParams"
|
|
11
13
|
style="margin-bottom: 14px;"
|
|
12
14
|
@onSubmit="onSearchSubmit">
|
|
13
15
|
<slot name="formBtnExpand"></slot>
|
|
@@ -125,6 +127,11 @@ export default {
|
|
|
125
127
|
showPagination: {
|
|
126
128
|
type: Boolean,
|
|
127
129
|
default: true
|
|
130
|
+
},
|
|
131
|
+
// 调用logic获取数据源的追加参数
|
|
132
|
+
getDataAppendParams: {
|
|
133
|
+
type: Object,
|
|
134
|
+
default: undefined
|
|
128
135
|
}
|
|
129
136
|
},
|
|
130
137
|
watch: {
|
|
@@ -44,6 +44,7 @@ export default {
|
|
|
44
44
|
| fixedAddForm | 固定新增表单,会和新增表单合并 | Object | {} |
|
|
45
45
|
| isExports | 是否显示导出按钮 | Boolean | true |
|
|
46
46
|
| viewMode | 是否为预览模式 | Boolean | false |
|
|
47
|
+
| getDataAppendParams | 调用logic获取数据源的追加参数 | Object | - |
|
|
47
48
|
| @action | 表格详情列的单击事件 | event | - |
|
|
48
49
|
| @afterSubmit | 增改提交后的回调方法 | event | - |
|
|
49
50
|
| @afterDelete | 删除提交后的回调方法 | event | - |
|
|
@@ -4,12 +4,12 @@ module.exports = {
|
|
|
4
4
|
{
|
|
5
5
|
label: '渲染查询表单项',
|
|
6
6
|
value: 'queryForm',
|
|
7
|
-
noMatch: ['file', 'image', 'textarea', 'personSetting'
|
|
7
|
+
noMatch: ['file', 'image', 'textarea', 'personSetting']
|
|
8
8
|
},
|
|
9
9
|
{
|
|
10
10
|
label: '渲染表格列',
|
|
11
11
|
value: 'table',
|
|
12
|
-
noMatch: ['file', 'image', 'personSetting'
|
|
12
|
+
noMatch: ['file', 'image', 'personSetting']
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
label: '渲染新增/修改表单项',
|
|
@@ -19,12 +19,12 @@ module.exports = {
|
|
|
19
19
|
{
|
|
20
20
|
label: 'SQL生成查询项',
|
|
21
21
|
value: 'sqlQueryItem',
|
|
22
|
-
noMatch: ['file', 'personSetting'
|
|
22
|
+
noMatch: ['file', 'personSetting']
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
label: 'SQL生成查询表达式',
|
|
26
26
|
value: 'sqlQueryCondition',
|
|
27
|
-
noMatch: ['file', 'image', 'textarea', 'personSetting'
|
|
27
|
+
noMatch: ['file', 'image', 'textarea', 'personSetting']
|
|
28
28
|
}
|
|
29
29
|
],
|
|
30
30
|
// 表单类型
|
|
@@ -231,7 +231,7 @@ module.exports = {
|
|
|
231
231
|
{
|
|
232
232
|
label: '不包含[not in]',
|
|
233
233
|
key: 'NOT_IN',
|
|
234
|
-
match: [
|
|
234
|
+
match: []
|
|
235
235
|
},
|
|
236
236
|
{
|
|
237
237
|
label: '之间[between]',
|