vue2-client 1.8.165 → 1.8.167
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 +15 -1
- 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)">
|
|
@@ -84,7 +84,21 @@
|
|
|
84
84
|
</span>
|
|
85
85
|
<!-- 操作列(action) -->
|
|
86
86
|
<span v-else-if="item.slotType === 'action'" :key="index">
|
|
87
|
-
<
|
|
87
|
+
<template v-if="item.actionArr && item.actionArr.length > 0">
|
|
88
|
+
<a-dropdown>
|
|
89
|
+
<a class="ant-dropdown-link" @click="e => e.preventDefault()">
|
|
90
|
+
{{ item.scopedSlots?.customRender || item.slotValue }} <a-icon type="down" />
|
|
91
|
+
</a>
|
|
92
|
+
<a-menu slot="overlay">
|
|
93
|
+
<a-menu-item v-for="(action_item,index) in item.actionArr" :key="index">
|
|
94
|
+
<a @click="action(record, item.dataIndex, action_item.func)">{{ action_item.text }}</a>
|
|
95
|
+
</a-menu-item>
|
|
96
|
+
</a-menu>
|
|
97
|
+
</a-dropdown>
|
|
98
|
+
</template>
|
|
99
|
+
<template v-if="!item.actionArr || item.actionArr.length === 0">
|
|
100
|
+
<a @click="action(record, item.dataIndex)">{{ item.slotValue }}</a>
|
|
101
|
+
</template>
|
|
88
102
|
</span>
|
|
89
103
|
</template>
|
|
90
104
|
<template slot="footer">
|