vue2-client 1.8.166 → 1.8.168
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/package.json +1 -1
- package/src/base-client/components/common/XReport/XReport.vue +1 -1
- package/src/base-client/components/common/XReport/XReportDesign.vue +30 -21
- package/src/base-client/components/common/XReport/XReportTrGroup.vue +7 -1
- package/src/base-client/components/common/XTable/XTable.vue +3 -2
- package/src/pages/Example/index.vue +1341 -1214
package/package.json
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<!-- 用以包裹整个页面 -->
|
|
23
23
|
<a-card v-if="!showSkeleton">
|
|
24
24
|
<!-- 切换菜单 -->
|
|
25
|
-
<a-radio-group v-model="type" default-value="a" button-style="solid" @change="tabChanged">
|
|
25
|
+
<a-radio-group v-model="type" default-value="a" button-style="solid" @change="tabChanged" v-show="!onlyDisplay">
|
|
26
26
|
<a-radio-button value="design" v-if="!onlyDisplay">
|
|
27
27
|
设计
|
|
28
28
|
</a-radio-button>
|
|
@@ -68,27 +68,29 @@
|
|
|
68
68
|
</template>
|
|
69
69
|
</template>
|
|
70
70
|
<!-- 列表 -->
|
|
71
|
-
<template v-else-if="row[0].type === 'list'"
|
|
72
|
-
<template v-
|
|
73
|
-
<
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
<
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
71
|
+
<template v-else-if="row[0].type === 'list'" >
|
|
72
|
+
<template v-for="(num, listIndex) in row[0].listLength + 1">
|
|
73
|
+
<template v-if="!forDisplay">
|
|
74
|
+
<x-report-tr-group
|
|
75
|
+
:config="activatedConfig"
|
|
76
|
+
:key="rowIndex + listIndex"
|
|
77
|
+
:columns="row"
|
|
78
|
+
:no-top-border="noTopBorder"
|
|
79
|
+
:config-data="activatedConfig.data"
|
|
80
|
+
:list-index="listIndex">
|
|
81
|
+
</x-report-tr-group>
|
|
82
|
+
</template>
|
|
83
|
+
<template v-else>
|
|
84
|
+
<x-report-tr-group
|
|
85
|
+
:config="activatedConfig"
|
|
86
|
+
:key="rowIndex + listIndex"
|
|
87
|
+
:columns="row"
|
|
88
|
+
:no-top-border="noTopBorder"
|
|
89
|
+
:config-data="activatedConfig.data"
|
|
90
|
+
:list-index="listIndex"
|
|
91
|
+
:display="true">
|
|
92
|
+
</x-report-tr-group>
|
|
93
|
+
</template>
|
|
92
94
|
</template>
|
|
93
95
|
</template>
|
|
94
96
|
<!-- 动态行 -->
|
|
@@ -253,6 +255,13 @@ export default {
|
|
|
253
255
|
this.activatedConfig = this.config
|
|
254
256
|
this.render = true
|
|
255
257
|
}
|
|
258
|
+
this.activatedConfig.columns.forEach(row => {
|
|
259
|
+
if (row[0].type === 'list' && row[0].listLength === 1) {
|
|
260
|
+
row.forEach(cell => {
|
|
261
|
+
cell.listLength = this.activatedConfig.data[cell.dataIndex].length
|
|
262
|
+
})
|
|
263
|
+
}
|
|
264
|
+
})
|
|
256
265
|
},
|
|
257
266
|
watch: {
|
|
258
267
|
config: {
|
|
@@ -46,12 +46,18 @@
|
|
|
46
46
|
</template>
|
|
47
47
|
</template>
|
|
48
48
|
<template v-else-if="cell.type === 'list'">
|
|
49
|
-
<template v-if="
|
|
49
|
+
<template v-if="listIndex === 0">
|
|
50
|
+
<span style="font-weight: bold">{{ cell.listHead }}</span>
|
|
51
|
+
</template>
|
|
52
|
+
<template v-else-if="cell.listType === 'input'">
|
|
50
53
|
{{ getDeepObject(configData, cell.dataIndex)[listIndex] }}
|
|
51
54
|
</template>
|
|
52
55
|
<template v-else-if="cell.listType === 'value'">
|
|
53
56
|
{{ cell.content[listIndex] }}
|
|
54
57
|
</template>
|
|
58
|
+
<template v-else-if="cell.listType === 'variable'">
|
|
59
|
+
{{ configData[cell.dataIndex][listIndex - 1][cell.listDataIndex] }}
|
|
60
|
+
</template>
|
|
55
61
|
</template>
|
|
56
62
|
<template v-else-if="cell.type === 'images'">
|
|
57
63
|
<template v-for="(img,imgIndex) in getDeepObject(configData.images, cell.dataIndex)">
|
|
@@ -320,9 +320,10 @@ export default {
|
|
|
320
320
|
* 操作列事件
|
|
321
321
|
* @param record 本条数据
|
|
322
322
|
* @param actionType 操作类型
|
|
323
|
+
* @param func 事件默认 action
|
|
323
324
|
*/
|
|
324
|
-
action (record, actionType) {
|
|
325
|
-
this.$emit(
|
|
325
|
+
action (record, actionType, func = 'action') {
|
|
326
|
+
this.$emit(func, record, record[this.getPrimaryKeyName()], actionType)
|
|
326
327
|
},
|
|
327
328
|
/**
|
|
328
329
|
* 选择列事件
|