vue2-client 1.8.205 → 1.8.207
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/docs/lowcode.md +161 -161
- package/package.json +1 -1
- package/src/App.vue +8 -5
- package/src/base-client/components/common/LowCodePageRender/editorPageRender.vue +119 -24
- package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +38 -2
- package/src/base-client/components/common/XAddNativeForm/lowcodeEditorRegister.js +12 -0
- package/src/base-client/components/common/XDescriptions/XDescriptions.vue +31 -3
- package/src/base-client/components/common/XDescriptions/lowcodeEditorRegister.js +21 -0
- package/src/base-client/components/common/XFormTable/XFormTable.vue +11 -2
- package/src/base-client/components/common/XReportSlot/index.md +48 -48
- package/src/pages/lowCode/lowCodeEditor.vue +289 -66
- package/src/utils/lowcode/registerComponentForEditor.js +5 -1
- package/src/utils/lowcode/registerComponentForRender.js +5 -1
- package/vue.config.js +5 -4
|
@@ -30,21 +30,23 @@
|
|
|
30
30
|
import { mapState } from 'vuex'
|
|
31
31
|
import { getRealKeyData } from '@vue2-client/utils/formatter'
|
|
32
32
|
import { getConfigByName } from '@vue2-client/services/api/common'
|
|
33
|
+
import lowcodeComponentMixin from '@vue2-client/utils/lowcode/lowcodeComponentMixin'
|
|
33
34
|
|
|
34
35
|
export default {
|
|
35
36
|
name: 'XDescriptions',
|
|
36
37
|
components: {
|
|
37
38
|
},
|
|
39
|
+
mixins: [lowcodeComponentMixin],
|
|
38
40
|
props: {
|
|
39
41
|
// 标题
|
|
40
42
|
title: {
|
|
41
43
|
type: String,
|
|
42
|
-
|
|
44
|
+
default: ''
|
|
43
45
|
},
|
|
44
46
|
// 内容
|
|
45
47
|
content: {
|
|
46
48
|
type: Object,
|
|
47
|
-
|
|
49
|
+
default: undefined
|
|
48
50
|
},
|
|
49
51
|
// 模型名
|
|
50
52
|
model: {
|
|
@@ -55,7 +57,7 @@ export default {
|
|
|
55
57
|
// 配置名称
|
|
56
58
|
configName: {
|
|
57
59
|
type: String,
|
|
58
|
-
|
|
60
|
+
default: ''
|
|
59
61
|
},
|
|
60
62
|
// 配置所属命名空间
|
|
61
63
|
serviceName: {
|
|
@@ -89,6 +91,13 @@ export default {
|
|
|
89
91
|
},
|
|
90
92
|
methods: {
|
|
91
93
|
initConfig () {
|
|
94
|
+
console.warn('content', this.content, typeof this.content)
|
|
95
|
+
console.warn('configName', this.configName, typeof this.configName)
|
|
96
|
+
console.warn('serviceName', this.serviceName, typeof this.serviceName)
|
|
97
|
+
if (this.content === undefined || this.configName === '' || this.serviceName === undefined) {
|
|
98
|
+
console.error('未传递content, serviceName或configName!加载失败')
|
|
99
|
+
return
|
|
100
|
+
}
|
|
92
101
|
this.loading = true
|
|
93
102
|
this.loadError = false
|
|
94
103
|
if (this.configName) {
|
|
@@ -99,7 +108,9 @@ export default {
|
|
|
99
108
|
}
|
|
100
109
|
},
|
|
101
110
|
getConfig () {
|
|
111
|
+
console.warn('1')
|
|
102
112
|
getConfigByName(this.configName, this.serviceName, (res) => {
|
|
113
|
+
console.warn('res')
|
|
103
114
|
const mapIndex = {}
|
|
104
115
|
const result = {}
|
|
105
116
|
if (res.formJson) {
|
|
@@ -139,6 +150,23 @@ export default {
|
|
|
139
150
|
formatText (value) {
|
|
140
151
|
return value || '--'
|
|
141
152
|
}
|
|
153
|
+
},
|
|
154
|
+
watch: {
|
|
155
|
+
content: {
|
|
156
|
+
handler () {
|
|
157
|
+
this.initConfig()
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
configName: {
|
|
161
|
+
handler () {
|
|
162
|
+
this.initConfig()
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
serviceName: {
|
|
166
|
+
handler () {
|
|
167
|
+
this.initConfig()
|
|
168
|
+
}
|
|
169
|
+
}
|
|
142
170
|
}
|
|
143
171
|
}
|
|
144
172
|
</script>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export const XDescriptionsConfig = {
|
|
2
|
+
type: 'XDescriptions',
|
|
3
|
+
properties: {
|
|
4
|
+
title: {
|
|
5
|
+
type: 'string'
|
|
6
|
+
},
|
|
7
|
+
content: {
|
|
8
|
+
type: 'object'
|
|
9
|
+
},
|
|
10
|
+
configName: {
|
|
11
|
+
type: 'string'
|
|
12
|
+
},
|
|
13
|
+
serviceName: {
|
|
14
|
+
type: 'string'
|
|
15
|
+
},
|
|
16
|
+
getRealData: {
|
|
17
|
+
type: 'boolean'
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
selfEvent: []
|
|
21
|
+
}
|
|
@@ -88,7 +88,11 @@ import XAddForm from '@vue2-client/base-client/components/common/XAddForm'
|
|
|
88
88
|
import XTable from '@vue2-client/base-client/components/common/XTable'
|
|
89
89
|
import XTree from '@vue2-client/base-client/components/common/XTree'
|
|
90
90
|
import XImportExcel from '@vue2-client/base-client/components/common/XImportExcel'
|
|
91
|
-
import {
|
|
91
|
+
import {
|
|
92
|
+
getConfigByName,
|
|
93
|
+
getConfigByLogic,
|
|
94
|
+
parseConfig,
|
|
95
|
+
} from '@vue2-client/services/api/common'
|
|
92
96
|
import { mapState } from 'vuex'
|
|
93
97
|
import lowcodeComponentMixin from '@vue2-client/utils/lowcode/lowcodeComponentMixin'
|
|
94
98
|
|
|
@@ -239,6 +243,11 @@ export default {
|
|
|
239
243
|
handler () {
|
|
240
244
|
this.initConfig()
|
|
241
245
|
}
|
|
246
|
+
},
|
|
247
|
+
serviceName: {
|
|
248
|
+
handler () {
|
|
249
|
+
this.initConfig()
|
|
250
|
+
}
|
|
242
251
|
}
|
|
243
252
|
},
|
|
244
253
|
created () {
|
|
@@ -361,7 +370,7 @@ export default {
|
|
|
361
370
|
*/
|
|
362
371
|
action (record, id, actionType, fun = 'action') {
|
|
363
372
|
this.$emit(fun, record, id, actionType)
|
|
364
|
-
this.$lowCodeEmit(
|
|
373
|
+
this.$lowCodeEmit(fun, record)
|
|
365
374
|
},
|
|
366
375
|
treeOnChecked (checkedKeys, deepNodes, deepKeys) {
|
|
367
376
|
this.$emit('treeOnChecked', checkedKeys, deepNodes, deepKeys)
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
# XReportSlot 暂时废弃
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
动态报表的插槽组件,可以递归使用
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
## 何时使用
|
|
8
|
-
|
|
9
|
-
> 当需要一个动态生成的报表时
|
|
10
|
-
|
|
11
|
-
> 一般由XReportDesign嵌套使用,在XReportDesign中判断当前行如果类型是slot,
|
|
12
|
-
> 则递归此组件
|
|
13
|
-
|
|
14
|
-
引用方式:
|
|
15
|
-
|
|
16
|
-
```javascript
|
|
17
|
-
import XReportSlot from '@vue2-client/base-client/components/XReportSlot/XReportSlot'
|
|
18
|
-
|
|
19
|
-
export default {
|
|
20
|
-
components: {
|
|
21
|
-
XReportSlot
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
## API
|
|
28
|
-
|
|
29
|
-
| 参数 | 说明 | 类型 | 默认值 |
|
|
30
|
-
|-----------------|--------------------------|--------|------|
|
|
31
|
-
| config | 表格完整配置 | Object | 无(必填) |
|
|
32
|
-
| forDisplay | 是否为展示页 | Boolean | false |
|
|
33
|
-
| slotConfigName | 插槽名 | String | undefined |
|
|
34
|
-
|
|
35
|
-
## 例子1
|
|
36
|
-
----
|
|
37
|
-
```vue
|
|
38
|
-
<XReportSlot
|
|
39
|
-
:config="activatedConfig"
|
|
40
|
-
:slot-config-name="slotConfig"
|
|
41
|
-
:for-display="forDisplay">
|
|
42
|
-
</XReportSlot>
|
|
43
|
-
```
|
|
44
|
-
## 注意事项
|
|
45
|
-
> slotConfigName如果不填,则展示整个表格。
|
|
46
|
-
> 如果填写,则仅展示插槽中的内容
|
|
47
|
-
|
|
48
|
-
> 该组件可以递归调用
|
|
1
|
+
# XReportSlot 暂时废弃
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
动态报表的插槽组件,可以递归使用
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
## 何时使用
|
|
8
|
+
|
|
9
|
+
> 当需要一个动态生成的报表时
|
|
10
|
+
|
|
11
|
+
> 一般由XReportDesign嵌套使用,在XReportDesign中判断当前行如果类型是slot,
|
|
12
|
+
> 则递归此组件
|
|
13
|
+
|
|
14
|
+
引用方式:
|
|
15
|
+
|
|
16
|
+
```javascript
|
|
17
|
+
import XReportSlot from '@vue2-client/base-client/components/XReportSlot/XReportSlot'
|
|
18
|
+
|
|
19
|
+
export default {
|
|
20
|
+
components: {
|
|
21
|
+
XReportSlot
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
## API
|
|
28
|
+
|
|
29
|
+
| 参数 | 说明 | 类型 | 默认值 |
|
|
30
|
+
|-----------------|--------------------------|--------|------|
|
|
31
|
+
| config | 表格完整配置 | Object | 无(必填) |
|
|
32
|
+
| forDisplay | 是否为展示页 | Boolean | false |
|
|
33
|
+
| slotConfigName | 插槽名 | String | undefined |
|
|
34
|
+
|
|
35
|
+
## 例子1
|
|
36
|
+
----
|
|
37
|
+
```vue
|
|
38
|
+
<XReportSlot
|
|
39
|
+
:config="activatedConfig"
|
|
40
|
+
:slot-config-name="slotConfig"
|
|
41
|
+
:for-display="forDisplay">
|
|
42
|
+
</XReportSlot>
|
|
43
|
+
```
|
|
44
|
+
## 注意事项
|
|
45
|
+
> slotConfigName如果不填,则展示整个表格。
|
|
46
|
+
> 如果填写,则仅展示插槽中的内容
|
|
47
|
+
|
|
48
|
+
> 该组件可以递归调用
|