vue2-client 1.8.170 → 1.8.171
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/XForm/XForm.vue +3 -3
- package/src/base-client/components/common/XFormCol/XFormCol.vue +5 -7
- package/src/base-client/components/common/XFormTable/XFormTable.vue +1 -1
- package/src/base-client/components/common/XReport/XReport.vue +10 -1
- package/src/base-client/components/common/XReport/XReportDesign.vue +6 -1
- package/src/base-client/components/common/XReport/XReportJsonRender.vue +188 -184
- package/src/base-client/components/common/XReport/XReportTrGroup.vue +5 -5
- package/src/base-client/components/common/XReportSlot/index.md +48 -48
- package/src/components/CodeMirror/inedx.vue +118 -118
- package/src/components/CodeMirror/setting.js +40 -40
- package/src/config/CreateQueryConfig.js +322 -322
- package/src/pages/Example/index.vue +162 -124
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
layout="inline">
|
|
9
9
|
<a-row :gutter="24">
|
|
10
10
|
<x-form-item
|
|
11
|
-
v-for="(item, index) in realJsonData.slice(0,
|
|
11
|
+
v-for="(item, index) in realJsonData.slice(0,7)"
|
|
12
12
|
:key="index"
|
|
13
13
|
:attr="item"
|
|
14
14
|
:form="form"
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
</div>
|
|
30
30
|
<div v-show="advanced">
|
|
31
31
|
<x-form-item
|
|
32
|
-
v-for="(item, index) in realJsonData.slice(
|
|
32
|
+
v-for="(item, index) in realJsonData.slice(7)"
|
|
33
33
|
:key="'advanced'+index"
|
|
34
34
|
:attr="item"
|
|
35
35
|
:form="form"
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
<span
|
|
43
43
|
:style="advanced && { float: 'right', overflow: 'hidden' } || {} "
|
|
44
44
|
class="table-page-search-submitButtons">
|
|
45
|
-
<template v-if="realJsonData.length >
|
|
45
|
+
<template v-if="realJsonData.length >7">
|
|
46
46
|
<a @click="toggleAdvanced">
|
|
47
47
|
<span v-show="!advanced"><a-icon type="eye" :style="iconStyle"/> 更多条件</span>
|
|
48
48
|
<span v-show="advanced"><a-icon type="eye-invisible" :style="iconStyle"/> 收起更多</span>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
:md="flex.md"
|
|
6
6
|
:lg="flex.lg"
|
|
7
7
|
:xl="flex.xl"
|
|
8
|
-
:xxl="flex.xxl"
|
|
8
|
+
:xxl="flex.xxl">
|
|
9
9
|
<slot></slot>
|
|
10
10
|
</a-col>
|
|
11
11
|
</template>
|
|
@@ -21,18 +21,16 @@ export default {
|
|
|
21
21
|
return {
|
|
22
22
|
xs: 24,
|
|
23
23
|
sm: 24,
|
|
24
|
-
md:
|
|
25
|
-
lg:
|
|
26
|
-
xl:
|
|
24
|
+
md: 12,
|
|
25
|
+
lg: 8,
|
|
26
|
+
xl: 6,
|
|
27
27
|
xxl: 6
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
data () {
|
|
33
|
-
return {
|
|
34
|
-
|
|
35
|
-
}
|
|
33
|
+
return {}
|
|
36
34
|
}
|
|
37
35
|
}
|
|
38
36
|
</script>
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
:for-display="type === 'display'"
|
|
13
13
|
ref="XReportDesign"
|
|
14
14
|
id="printReady"
|
|
15
|
+
:show-title="showTitle"
|
|
15
16
|
:no-padding="noPadding"
|
|
16
17
|
:no-top-border="noTopBorder"
|
|
17
18
|
:show-images="hasImages"
|
|
@@ -41,6 +42,7 @@
|
|
|
41
42
|
:for-display="type === 'display'"
|
|
42
43
|
:no-padding="noPadding"
|
|
43
44
|
:no-top-border="noTopBorder"
|
|
45
|
+
:show-title="showTitle"
|
|
44
46
|
ref="XReportDesign"
|
|
45
47
|
id="printReady"
|
|
46
48
|
:show-images="hasImages"
|
|
@@ -115,7 +117,11 @@ export default {
|
|
|
115
117
|
noTopBorder: {
|
|
116
118
|
type: Boolean,
|
|
117
119
|
default: false
|
|
118
|
-
}
|
|
120
|
+
},
|
|
121
|
+
showTitle: {
|
|
122
|
+
type: Boolean,
|
|
123
|
+
default: true
|
|
124
|
+
},
|
|
119
125
|
},
|
|
120
126
|
components: {
|
|
121
127
|
XReportDesign
|
|
@@ -167,6 +173,9 @@ export default {
|
|
|
167
173
|
},
|
|
168
174
|
changeDeepObject (obj, strPath, newVal) {
|
|
169
175
|
const arr = strPath.split('@@@')
|
|
176
|
+
if (obj[arr[0]] === undefined) {
|
|
177
|
+
obj = obj.images
|
|
178
|
+
}
|
|
170
179
|
if (arr.length === 1) {
|
|
171
180
|
obj[arr[0]] = newVal
|
|
172
181
|
} else {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<template v-if="this.activatedConfig.designMode === 'json'">
|
|
4
4
|
<XReportJsonRender
|
|
5
|
+
:show-title="showTitle"
|
|
5
6
|
:no-padding="noPadding"
|
|
6
7
|
:no-top-border="noTopBorder"
|
|
7
8
|
:config="activatedConfig"/>
|
|
@@ -9,7 +10,7 @@
|
|
|
9
10
|
<template v-else>
|
|
10
11
|
<div :class=" noPadding ? 'reportMainNoPadding' : 'reportMain'" :style="activatedConfig.width > 0 ? ('width:' + activatedConfig.width + 'px') : undefined">
|
|
11
12
|
<!-- 大标题 -->
|
|
12
|
-
<h2 class="reportTitle" v-if="activatedConfig.title" v-html="activatedConfig.title"></h2>
|
|
13
|
+
<h2 class="reportTitle" v-if="showTitle && activatedConfig.title" v-html="activatedConfig.title"></h2>
|
|
13
14
|
<!-- 小标题 / 介乎于标题与表格之间的内容 -->
|
|
14
15
|
<div class="subTitle" v-if="activatedConfig.subTitle">
|
|
15
16
|
<div class="subTitleItems" v-for="(item, itemIndex) in activatedConfig.subTitle" :key="itemIndex">
|
|
@@ -182,6 +183,10 @@ export default {
|
|
|
182
183
|
noTopBorder: {
|
|
183
184
|
type: Boolean,
|
|
184
185
|
default: false
|
|
186
|
+
},
|
|
187
|
+
showTitle: {
|
|
188
|
+
type: Boolean,
|
|
189
|
+
default: true
|
|
185
190
|
}
|
|
186
191
|
},
|
|
187
192
|
components: {
|
|
@@ -1,184 +1,188 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :class="noPadding ? 'reportMainNoPadding' : 'reportMain'">
|
|
3
|
-
<table class="reportTable">
|
|
4
|
-
<tbody class="reportTable">
|
|
5
|
-
<tr v-if="config.title.type && config.title.type !== ''">
|
|
6
|
-
<td :class="noTopBorder ? 'tdWithNoTopBorder' : 'tdWithBorder'" colspan="12">
|
|
7
|
-
<template v-if="config.title.type === 'titleKey'">
|
|
8
|
-
{{ config.data[config.title.value] }}
|
|
9
|
-
</template>
|
|
10
|
-
<template v-else-if="config.title.type === 'titleValue'">
|
|
11
|
-
{{ config.title.value }}
|
|
12
|
-
</template>
|
|
13
|
-
</td>
|
|
14
|
-
</tr>
|
|
15
|
-
<template v-for="(row, rowIndex) in config.content">
|
|
16
|
-
<template v-if="row.type === 'jsonKey'">
|
|
17
|
-
<tr :key="rowIndex">
|
|
18
|
-
<!-- 表头 -->
|
|
19
|
-
<td :class="noTopBorder ? 'tdWithNoTopBorder' : 'tdWithBorder'" colspan="6">
|
|
20
|
-
<template v-if="receivedFunction[rowIndex].labelFunction(config).type === 'key'">
|
|
21
|
-
{{ config.data[receivedFunction[rowIndex].labelFunction(config).content] }}
|
|
22
|
-
</template>
|
|
23
|
-
<template v-else-if="receivedFunction[rowIndex].labelFunction(config).type === 'value'">
|
|
24
|
-
{{ receivedFunction[rowIndex].labelFunction(config).content }}
|
|
25
|
-
</template>
|
|
26
|
-
</td>
|
|
27
|
-
<!-- 内容 -->
|
|
28
|
-
<td :class="noTopBorder ? 'tdWithNoTopBorder' : 'tdWithBorder'" colspan="6">
|
|
29
|
-
<template v-if="receivedFunction[rowIndex].valueFunction(config).type === 'key'">
|
|
30
|
-
{{ config.data[receivedFunction[rowIndex].valueFunction(config).content] }}
|
|
31
|
-
</template>
|
|
32
|
-
<template v-else-if="receivedFunction[rowIndex].valueFunction(config).type === 'value'">
|
|
33
|
-
{{ receivedFunction[rowIndex].valueFunction(config).content }}
|
|
34
|
-
</template>
|
|
35
|
-
<template v-else-if="receivedFunction[rowIndex].valueFunction(config).type === 'img'">
|
|
36
|
-
<template v-for="(img, imgIndex) in receivedFunction[rowIndex].valueFunction(config).content">
|
|
37
|
-
<span :key="imgIndex" class="imgText">
|
|
38
|
-
<a-icon type="link"/>
|
|
39
|
-
<span @click="openImgModal(img)">{{ formatImgName(img) }}</span>
|
|
40
|
-
<br/>
|
|
41
|
-
</span>
|
|
42
|
-
</template>
|
|
43
|
-
</template>
|
|
44
|
-
</td>
|
|
45
|
-
</tr>
|
|
46
|
-
</template>
|
|
47
|
-
<template v-else-if="row.type === 'jsonArray'">
|
|
48
|
-
<tr :key="rowIndex + '' + jsonArrayItemIndex" v-for="(item, jsonArrayItemIndex) in config.data[row.jsonArrayDataIndex]">
|
|
49
|
-
<!-- 表头 -->
|
|
50
|
-
<td :class="noTopBorder ? 'tdWithNoTopBorder' : 'tdWithBorder'" colspan="6">
|
|
51
|
-
<template v-if="receivedFunction[rowIndex].labelFunction(config, item).type === 'key'">
|
|
52
|
-
{{ item[receivedFunction[rowIndex].labelFunction(config, item).content] }}
|
|
53
|
-
</template>
|
|
54
|
-
<template v-if="receivedFunction[rowIndex].labelFunction(config, item).type === 'value'">
|
|
55
|
-
{{ receivedFunction[rowIndex].labelFunction(config, item).content }}
|
|
56
|
-
</template>
|
|
57
|
-
</td>
|
|
58
|
-
<!-- 内容 -->
|
|
59
|
-
<td :class="noTopBorder ? 'tdWithNoTopBorder' : 'tdWithBorder'" colspan="6">
|
|
60
|
-
<template v-if="receivedFunction[rowIndex].valueFunction(config, item).type === 'key'">
|
|
61
|
-
{{ item[receivedFunction[rowIndex].valueFunction(config, item).content] }}
|
|
62
|
-
</template>
|
|
63
|
-
<template v-if="receivedFunction[rowIndex].valueFunction(config, item).type === 'value'">
|
|
64
|
-
{{ receivedFunction[rowIndex].valueFunction(config, item).content }}
|
|
65
|
-
</template>
|
|
66
|
-
</td>
|
|
67
|
-
</tr>
|
|
68
|
-
</template>
|
|
69
|
-
</template>
|
|
70
|
-
</tbody>
|
|
71
|
-
</table>
|
|
72
|
-
<a-modal
|
|
73
|
-
title="图片"
|
|
74
|
-
width="80%"
|
|
75
|
-
:visible="showImgModal"
|
|
76
|
-
@ok="handleShowImgOk"
|
|
77
|
-
@cancel="handleShowImgCancel"
|
|
78
|
-
:z-index="1001"
|
|
79
|
-
:destroyOnClose="true">
|
|
80
|
-
<div style="width: 100%;display: flex;justify-content: center;align-items: center">
|
|
81
|
-
<img :src="showImageSrc" alt="图片"/>
|
|
82
|
-
</div>
|
|
83
|
-
</a-modal>
|
|
84
|
-
</div>
|
|
85
|
-
</template>
|
|
86
|
-
|
|
87
|
-
<script>
|
|
88
|
-
|
|
89
|
-
export default {
|
|
90
|
-
name: 'XReportJsonRender',
|
|
91
|
-
props: {
|
|
92
|
-
config: {
|
|
93
|
-
type: Object,
|
|
94
|
-
required: true
|
|
95
|
-
},
|
|
96
|
-
noPadding: {
|
|
97
|
-
type: Boolean,
|
|
98
|
-
default: false
|
|
99
|
-
},
|
|
100
|
-
noTopBorder: {
|
|
101
|
-
type: Boolean,
|
|
102
|
-
default: false
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
this.showImgModal = false
|
|
119
|
-
this.showImageSrc = undefined
|
|
120
|
-
},
|
|
121
|
-
|
|
122
|
-
this.
|
|
123
|
-
this.
|
|
124
|
-
},
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
}
|
|
173
|
-
.
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
}
|
|
177
|
-
.
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="noPadding ? 'reportMainNoPadding' : 'reportMain'">
|
|
3
|
+
<table class="reportTable">
|
|
4
|
+
<tbody class="reportTable">
|
|
5
|
+
<tr v-if="showTitle && config.title.type && config.title.type !== ''">
|
|
6
|
+
<td :class="noTopBorder ? 'tdWithNoTopBorder' : 'tdWithBorder'" colspan="12">
|
|
7
|
+
<template v-if="config.title.type === 'titleKey'">
|
|
8
|
+
{{ config.data[config.title.value] }}
|
|
9
|
+
</template>
|
|
10
|
+
<template v-else-if="config.title.type === 'titleValue'">
|
|
11
|
+
{{ config.title.value }}
|
|
12
|
+
</template>
|
|
13
|
+
</td>
|
|
14
|
+
</tr>
|
|
15
|
+
<template v-for="(row, rowIndex) in config.content">
|
|
16
|
+
<template v-if="row.type === 'jsonKey'">
|
|
17
|
+
<tr :key="rowIndex">
|
|
18
|
+
<!-- 表头 -->
|
|
19
|
+
<td :class="noTopBorder ? 'tdWithNoTopBorder' : 'tdWithBorder'" colspan="6">
|
|
20
|
+
<template v-if="receivedFunction[rowIndex].labelFunction(config).type === 'key'">
|
|
21
|
+
{{ config.data[receivedFunction[rowIndex].labelFunction(config).content] }}
|
|
22
|
+
</template>
|
|
23
|
+
<template v-else-if="receivedFunction[rowIndex].labelFunction(config).type === 'value'">
|
|
24
|
+
{{ receivedFunction[rowIndex].labelFunction(config).content }}
|
|
25
|
+
</template>
|
|
26
|
+
</td>
|
|
27
|
+
<!-- 内容 -->
|
|
28
|
+
<td :class="noTopBorder ? 'tdWithNoTopBorder' : 'tdWithBorder'" colspan="6">
|
|
29
|
+
<template v-if="receivedFunction[rowIndex].valueFunction(config).type === 'key'">
|
|
30
|
+
{{ config.data[receivedFunction[rowIndex].valueFunction(config).content] }}
|
|
31
|
+
</template>
|
|
32
|
+
<template v-else-if="receivedFunction[rowIndex].valueFunction(config).type === 'value'">
|
|
33
|
+
{{ receivedFunction[rowIndex].valueFunction(config).content }}
|
|
34
|
+
</template>
|
|
35
|
+
<template v-else-if="receivedFunction[rowIndex].valueFunction(config).type === 'img'">
|
|
36
|
+
<template v-for="(img, imgIndex) in receivedFunction[rowIndex].valueFunction(config).content">
|
|
37
|
+
<span :key="imgIndex" class="imgText">
|
|
38
|
+
<a-icon type="link"/>
|
|
39
|
+
<span @click="openImgModal(img)">{{ formatImgName(img) }}</span>
|
|
40
|
+
<br/>
|
|
41
|
+
</span>
|
|
42
|
+
</template>
|
|
43
|
+
</template>
|
|
44
|
+
</td>
|
|
45
|
+
</tr>
|
|
46
|
+
</template>
|
|
47
|
+
<template v-else-if="row.type === 'jsonArray'">
|
|
48
|
+
<tr :key="rowIndex + '' + jsonArrayItemIndex" v-for="(item, jsonArrayItemIndex) in config.data[row.jsonArrayDataIndex]">
|
|
49
|
+
<!-- 表头 -->
|
|
50
|
+
<td :class="noTopBorder ? 'tdWithNoTopBorder' : 'tdWithBorder'" colspan="6">
|
|
51
|
+
<template v-if="receivedFunction[rowIndex].labelFunction(config, item).type === 'key'">
|
|
52
|
+
{{ item[receivedFunction[rowIndex].labelFunction(config, item).content] }}
|
|
53
|
+
</template>
|
|
54
|
+
<template v-if="receivedFunction[rowIndex].labelFunction(config, item).type === 'value'">
|
|
55
|
+
{{ receivedFunction[rowIndex].labelFunction(config, item).content }}
|
|
56
|
+
</template>
|
|
57
|
+
</td>
|
|
58
|
+
<!-- 内容 -->
|
|
59
|
+
<td :class="noTopBorder ? 'tdWithNoTopBorder' : 'tdWithBorder'" colspan="6">
|
|
60
|
+
<template v-if="receivedFunction[rowIndex].valueFunction(config, item).type === 'key'">
|
|
61
|
+
{{ item[receivedFunction[rowIndex].valueFunction(config, item).content] }}
|
|
62
|
+
</template>
|
|
63
|
+
<template v-if="receivedFunction[rowIndex].valueFunction(config, item).type === 'value'">
|
|
64
|
+
{{ receivedFunction[rowIndex].valueFunction(config, item).content }}
|
|
65
|
+
</template>
|
|
66
|
+
</td>
|
|
67
|
+
</tr>
|
|
68
|
+
</template>
|
|
69
|
+
</template>
|
|
70
|
+
</tbody>
|
|
71
|
+
</table>
|
|
72
|
+
<a-modal
|
|
73
|
+
title="图片"
|
|
74
|
+
width="80%"
|
|
75
|
+
:visible="showImgModal"
|
|
76
|
+
@ok="handleShowImgOk"
|
|
77
|
+
@cancel="handleShowImgCancel"
|
|
78
|
+
:z-index="1001"
|
|
79
|
+
:destroyOnClose="true">
|
|
80
|
+
<div style="width: 100%;display: flex;justify-content: center;align-items: center">
|
|
81
|
+
<img :src="showImageSrc" alt="图片"/>
|
|
82
|
+
</div>
|
|
83
|
+
</a-modal>
|
|
84
|
+
</div>
|
|
85
|
+
</template>
|
|
86
|
+
|
|
87
|
+
<script>
|
|
88
|
+
|
|
89
|
+
export default {
|
|
90
|
+
name: 'XReportJsonRender',
|
|
91
|
+
props: {
|
|
92
|
+
config: {
|
|
93
|
+
type: Object,
|
|
94
|
+
required: true
|
|
95
|
+
},
|
|
96
|
+
noPadding: {
|
|
97
|
+
type: Boolean,
|
|
98
|
+
default: false
|
|
99
|
+
},
|
|
100
|
+
noTopBorder: {
|
|
101
|
+
type: Boolean,
|
|
102
|
+
default: false
|
|
103
|
+
},
|
|
104
|
+
showTitle: {
|
|
105
|
+
type: Boolean,
|
|
106
|
+
default: true
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
data () {
|
|
110
|
+
return {
|
|
111
|
+
receivedFunction: [],
|
|
112
|
+
showImgModal: false,
|
|
113
|
+
showImageSrc: undefined
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
methods: {
|
|
117
|
+
handleShowImgOk () {
|
|
118
|
+
this.showImgModal = false
|
|
119
|
+
this.showImageSrc = undefined
|
|
120
|
+
},
|
|
121
|
+
handleShowImgCancel () {
|
|
122
|
+
this.showImgModal = false
|
|
123
|
+
this.showImageSrc = undefined
|
|
124
|
+
},
|
|
125
|
+
openImgModal (img) {
|
|
126
|
+
this.showImageSrc = img
|
|
127
|
+
this.showImgModal = true
|
|
128
|
+
},
|
|
129
|
+
formatImgName (imgSrc) {
|
|
130
|
+
return imgSrc.split('/').pop()
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
beforeMount () {
|
|
134
|
+
for (let i = 0; i < this.config.content.length; i++) {
|
|
135
|
+
this.receivedFunction.push({
|
|
136
|
+
// eslint-disable-next-line no-eval
|
|
137
|
+
labelFunction: eval('(' + this.config.content[i].customFunctionForLabel + ')'),
|
|
138
|
+
// eslint-disable-next-line no-eval
|
|
139
|
+
valueFunction: eval('(' + this.config.content[i].customFunctionForValue + ')')
|
|
140
|
+
})
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
</script>
|
|
145
|
+
|
|
146
|
+
<style scoped lang="less">
|
|
147
|
+
.reportMain {
|
|
148
|
+
text-align: center;
|
|
149
|
+
margin: 0 auto;
|
|
150
|
+
font-size: 16px;
|
|
151
|
+
color: #000;
|
|
152
|
+
background-color: #fff;
|
|
153
|
+
padding: 15px;
|
|
154
|
+
border-radius: 8px;
|
|
155
|
+
}
|
|
156
|
+
.reportMainNoPadding {
|
|
157
|
+
text-align: center;
|
|
158
|
+
margin: 0 auto;
|
|
159
|
+
font-size: 16px;
|
|
160
|
+
color: #000;
|
|
161
|
+
background-color: #fff;
|
|
162
|
+
border-radius: 8px;
|
|
163
|
+
}
|
|
164
|
+
.reportTitle {
|
|
165
|
+
font-weight: bold;
|
|
166
|
+
}
|
|
167
|
+
.reportTable {
|
|
168
|
+
width: 100%;
|
|
169
|
+
border-collapse: collapse;
|
|
170
|
+
table-layout:fixed;
|
|
171
|
+
word-break:break-all;
|
|
172
|
+
}
|
|
173
|
+
.tdWithBorder {
|
|
174
|
+
border: 1px solid #000;
|
|
175
|
+
padding: 8px;
|
|
176
|
+
}
|
|
177
|
+
.imgText:hover {
|
|
178
|
+
color: rgb( 24,144,255);
|
|
179
|
+
cursor: pointer;
|
|
180
|
+
}
|
|
181
|
+
.tdWithNoTopBorder {
|
|
182
|
+
border-top-style: none;
|
|
183
|
+
border-left: 1px solid #000;
|
|
184
|
+
border-right: 1px solid #000;
|
|
185
|
+
border-bottom: 1px solid #000;
|
|
186
|
+
padding: 8px;
|
|
187
|
+
}
|
|
188
|
+
</style>
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
{{ cell.text }}
|
|
19
19
|
</template>
|
|
20
20
|
</template>
|
|
21
|
+
<!-- 占位 -->
|
|
21
22
|
<template v-else-if="cell.type === 'placeHolderColumn'">
|
|
22
|
-
<!-- 占位 -->
|
|
23
23
|
</template>
|
|
24
24
|
<template v-else-if="cell.type === 'value'">
|
|
25
25
|
<template v-if="cell.customFunction === undefined">
|
|
@@ -60,12 +60,12 @@
|
|
|
60
60
|
</template>
|
|
61
61
|
</template>
|
|
62
62
|
<template v-else-if="cell.type === 'images'">
|
|
63
|
-
<template v-
|
|
64
|
-
<span :key="imgIndex" style="margin-right: 5%">{{ img.name }}</span>
|
|
65
|
-
</template>
|
|
66
|
-
<template v-if="getDeepObject(configData.images, cell.dataIndex).length === 0">
|
|
63
|
+
<template v-if="getDeepObject(configData.images, cell.dataIndex) === undefined || getDeepObject(configData.images, cell.dataIndex).length === 0">
|
|
67
64
|
<span>无</span>
|
|
68
65
|
</template>
|
|
66
|
+
<template v-else v-for="(img,imgIndex) in getDeepObject(configData.images, cell.dataIndex)">
|
|
67
|
+
<span :key="imgIndex" style="margin-right: 5%">{{ img.name }}</span>
|
|
68
|
+
</template>
|
|
69
69
|
</template>
|
|
70
70
|
</td>
|
|
71
71
|
</template>
|
|
@@ -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
|
+
> 该组件可以递归调用
|