vue2-client 1.8.166 → 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/.env +19 -19
- package/.eslintrc.js +90 -90
- package/CHANGELOG.md +824 -824
- package/Components.md +60 -60
- package/babel.config.js +21 -21
- package/docs/index.md +30 -30
- package/index.js +31 -31
- package/jest-transform-stub.js +8 -8
- package/jest.config.js +21 -21
- package/jest.setup.js +7 -7
- package/package.json +97 -97
- package/public/index.html +27 -27
- package/src/App.vue +164 -164
- package/src/ReportView.js +19 -19
- package/src/assets/img/querySlotDemo.svg +15 -15
- package/src/assets/svg/badtwo.svg +1 -1
- package/src/assets/svg/goodtwo.svg +1 -1
- package/src/base-client/components/common/AMisRender/index.js +3 -3
- package/src/base-client/components/common/AMisRender/index.vue +263 -263
- package/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox.vue +316 -316
- package/src/base-client/components/common/AmapMarker/AmapPointRendering.vue +120 -120
- package/src/base-client/components/common/CitySelect/index.js +3 -3
- package/src/base-client/components/common/CitySelect/index.md +109 -109
- package/src/base-client/components/common/CreateQuery/CreateQuery.vue +669 -669
- package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +1014 -1014
- package/src/base-client/components/common/CreateQuery/index.js +3 -3
- package/src/base-client/components/common/CreateQuery/index.md +42 -42
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQuery.vue +452 -452
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQueryItem.vue +511 -511
- package/src/base-client/components/common/CreateSimpleFormQuery/index.js +3 -3
- package/src/base-client/components/common/CreateSimpleFormQuery/index.md +42 -42
- package/src/base-client/components/common/FormGroupEdit/FormGroupEdit.vue +149 -149
- package/src/base-client/components/common/FormGroupEdit/index.js +3 -3
- package/src/base-client/components/common/FormGroupEdit/index.md +43 -43
- package/src/base-client/components/common/FormGroupQuery/FormGroupQuery.vue +166 -166
- package/src/base-client/components/common/FormGroupQuery/index.js +3 -3
- package/src/base-client/components/common/FormGroupQuery/index.md +43 -43
- package/src/base-client/components/common/JSONToTree/jsontotree.vue +271 -271
- package/src/base-client/components/common/PersonSetting/PersonSetting.vue +208 -208
- package/src/base-client/components/common/PersonSetting/index.js +3 -3
- package/src/base-client/components/common/Tree/Tree.vue +149 -149
- package/src/base-client/components/common/Tree/index.js +2 -2
- package/src/base-client/components/common/Upload/Upload.vue +197 -197
- package/src/base-client/components/common/Upload/index.js +3 -3
- package/src/base-client/components/common/XAddForm/XAddForm.vue +92 -92
- package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +502 -502
- package/src/base-client/components/common/XAddNativeForm/index.md +146 -146
- package/src/base-client/components/common/XAddNativeFormOA/XAddNativeFormOA.vue +303 -303
- package/src/base-client/components/common/XAddNativeFormOA/index.js +3 -3
- package/src/base-client/components/common/XAddNativeFormOA/index.md +146 -146
- package/src/base-client/components/common/XBadge/XBadge.vue +78 -78
- package/src/base-client/components/common/XCard/XCard.vue +64 -64
- package/src/base-client/components/common/XDataDrawer/XDataDrawer.vue +180 -180
- package/src/base-client/components/common/XDataDrawer/index.js +3 -3
- package/src/base-client/components/common/XDataDrawer/index.md +41 -41
- package/src/base-client/components/common/XDescriptions/XDescriptions.vue +117 -117
- package/src/base-client/components/common/XDescriptions/index.js +3 -3
- package/src/base-client/components/common/XDescriptions/index.md +83 -83
- package/src/base-client/components/common/XForm/XForm.vue +253 -253
- package/src/base-client/components/common/XForm/XFormItem.vue +545 -545
- package/src/base-client/components/common/XForm/XTreeSelect.vue +191 -191
- package/src/base-client/components/common/XForm/index.md +178 -178
- package/src/base-client/components/common/XFormCol/XFormCol.vue +38 -38
- package/src/base-client/components/common/XFormTable/XFormTable.vue +418 -418
- package/src/base-client/components/common/XFormTable/index.md +98 -98
- package/src/base-client/components/common/XImportExcel/XImportExcel.vue +131 -131
- package/src/base-client/components/common/XReport/XReport.vue +694 -694
- package/src/base-client/components/common/XReport/XReportDesign.vue +423 -414
- package/src/base-client/components/common/XReport/XReportTrGroup.vue +602 -596
- package/src/base-client/components/common/XReport/index.js +3 -3
- package/src/base-client/components/common/XReport/index.md +44 -44
- package/src/base-client/components/common/XReportSlot/XReportSlot.vue +110 -110
- package/src/base-client/components/common/XReportSlot/index.js +3 -3
- package/src/base-client/components/common/XStepView/XStepView.vue +252 -252
- package/src/base-client/components/common/XStepView/index.js +3 -3
- package/src/base-client/components/common/XStepView/index.md +31 -31
- package/src/base-client/components/common/XTable/XTable.vue +549 -549
- package/src/base-client/components/common/XTable/index.md +255 -255
- package/src/base-client/components/common/XTree/XTree.vue +76 -76
- package/src/base-client/components/common/XTree/index.js +3 -3
- package/src/base-client/components/common/XTree/index.md +36 -36
- package/src/base-client/components/index.js +47 -47
- package/src/base-client/components/system/DictionaryDetailsView/DictionaryDetailsView.vue +232 -232
- package/src/base-client/components/system/QueryParamsDetailsView/QueryParamsDetailsView.vue +281 -281
- package/src/base-client/plugins/AppData.js +115 -115
- package/src/base-client/plugins/Config.js +19 -19
- package/src/base-client/plugins/GetLoginInfoService.js +182 -182
- package/src/base-client/plugins/tabs-page-plugin.js +39 -39
- package/src/bootstrap.js +39 -39
- package/src/components/CodeMirror/inedx.vue +118 -118
- package/src/components/CodeMirror/setting.js +40 -40
- package/src/components/FilePreview/FilePreview.vue +166 -166
- package/src/components/NumberInfo/NumberInfo.vue +54 -54
- package/src/components/STable/index.js +323 -323
- package/src/components/checkbox/ColorCheckbox.vue +157 -157
- package/src/components/checkbox/ImgCheckbox.vue +163 -163
- package/src/components/menu/SideMenu.vue +75 -75
- package/src/components/menu/menu.js +273 -273
- package/src/components/tool/AStepItem.vue +60 -60
- package/src/config/CreateQueryConfig.js +322 -322
- package/src/config/default/antd.config.js +89 -89
- package/src/config/default/setting.config.js +53 -53
- package/src/font-style/font.css +4 -4
- package/src/layouts/CommonLayout.vue +56 -56
- package/src/layouts/PageLayout.vue +151 -151
- package/src/layouts/SinglePageView.vue +138 -138
- package/src/layouts/header/AdminHeader.vue +132 -132
- package/src/layouts/header/HeaderNotice.vue +177 -177
- package/src/layouts/tabs/TabsHead.vue +189 -189
- package/src/layouts/tabs/TabsView.vue +387 -387
- package/src/lib.js +1 -1
- package/src/main.js +26 -26
- package/src/mock/extend/index.js +84 -84
- package/src/mock/goods/index.js +108 -108
- package/src/pages/AMisDemo/AMisDemo.vue +325 -325
- package/src/pages/AMisDemo/AMisDemo2.vue +74 -74
- package/src/pages/DynamicStatistics/ChartSelector.vue +331 -331
- package/src/pages/DynamicStatistics/DataTabs.vue +83 -83
- package/src/pages/DynamicStatistics/DynamicTable.vue +128 -128
- package/src/pages/DynamicStatistics/EvaluationArea.vue +69 -69
- package/src/pages/DynamicStatistics/FavoriteList.vue +51 -51
- package/src/pages/DynamicStatistics/QuestionHistoryAndFavorites.vue +591 -591
- package/src/pages/DynamicStatistics/SearchBar.vue +192 -192
- package/src/pages/DynamicStatistics/index.vue +282 -282
- package/src/pages/Example/index.vue +1432 -1305
- package/src/pages/ServiceReview/index.vue +284 -284
- package/src/pages/XReportView/index.vue +62 -62
- package/src/pages/login/Login.vue +378 -378
- package/src/pages/login/LoginV3.vue +389 -389
- package/src/pages/resourceManage/orgListManage.vue +98 -98
- package/src/pages/system/dictionary/index.vue +44 -44
- package/src/pages/system/monitor/loginInfor/index.vue +37 -37
- package/src/pages/system/monitor/operLog/index.vue +37 -37
- package/src/pages/system/settings/modifyPassword.vue +117 -117
- package/src/pages/system/ticket/index.vue +480 -480
- package/src/pages/system/ticket/submitTicketSuccess.vue +484 -484
- package/src/router/async/config.async.js +32 -32
- package/src/router/async/router.map.js +98 -98
- package/src/router/guards.js +214 -214
- package/src/router/index.js +27 -27
- package/src/router.js +18 -18
- package/src/services/api/TicketDetailsViewApi.js +46 -46
- package/src/services/api/cas.js +79 -79
- package/src/services/api/common.js +274 -274
- package/src/services/api/entity.js +18 -18
- package/src/services/api/index.js +17 -17
- package/src/services/api/restTools.js +46 -46
- package/src/services/apiService.js +14 -14
- package/src/services/user.js +71 -71
- package/src/store/modules/setting.js +119 -119
- package/src/theme/default/style.less +57 -57
- package/src/utils/authority-utils.js +85 -85
- package/src/utils/errorCode.js +6 -6
- package/src/utils/htmlToPDF.js +108 -108
- package/src/utils/htmlToPDFApi.js +5 -5
- package/src/utils/indexedDB.js +201 -201
- package/src/utils/login.js +141 -141
- package/src/utils/map-utils.js +47 -47
- package/src/utils/request.js +343 -343
- package/src/utils/routerUtil.js +428 -428
- package/src/utils/util.js +231 -231
- package/src/utils/waterMark.js +31 -31
- package/test/Amis.spec.js +163 -163
- package/test/Tree.spec.js +167 -167
- package/test/myDialog.spec.js +46 -46
- package/vue.config.js +166 -166
- package//350/277/201/347/247/273/346/227/245/345/277/227.md +15 -15
|
@@ -1,414 +1,423 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<template v-if="this.activatedConfig.designMode === 'json'">
|
|
4
|
-
<XReportJsonRender
|
|
5
|
-
:no-padding="noPadding"
|
|
6
|
-
:no-top-border="noTopBorder"
|
|
7
|
-
:config="activatedConfig"/>
|
|
8
|
-
</template>
|
|
9
|
-
<template v-else>
|
|
10
|
-
<div :class=" noPadding ? 'reportMainNoPadding' : 'reportMain'" :style="activatedConfig.width > 0 ? ('width:' + activatedConfig.width + 'px') : undefined">
|
|
11
|
-
<!-- 大标题 -->
|
|
12
|
-
<h2 class="reportTitle" v-if="activatedConfig.title" v-html="activatedConfig.title"></h2>
|
|
13
|
-
<!-- 小标题 / 介乎于标题与表格之间的内容 -->
|
|
14
|
-
<div class="subTitle" v-if="activatedConfig.subTitle">
|
|
15
|
-
<div class="subTitleItems" v-for="(item, itemIndex) in activatedConfig.subTitle" :key="itemIndex">
|
|
16
|
-
<template v-if="item.type === 'column'">
|
|
17
|
-
<span>{{ item.text }}</span>
|
|
18
|
-
</template>
|
|
19
|
-
<template v-else-if="item.type === 'inputs'">
|
|
20
|
-
<div class="inputsDiv">
|
|
21
|
-
<div class="inputsDivItem" v-for="(num, index) of calcFormatInputNum(item.format)" :key="index">
|
|
22
|
-
<span class="inputsDivItemLabel">{{ displayFormatStartText(item.format) }}</span>
|
|
23
|
-
<template v-if="!forDisplay">
|
|
24
|
-
<template v-if="item.inputReadOnly === true">
|
|
25
|
-
<a-input v-model="data[item.dataIndex][index]" :style="'width:' + (item.inputWidth ? item.inputWidth : '100') + '%'" :disabled="true"/>
|
|
26
|
-
</template>
|
|
27
|
-
<template v-else>
|
|
28
|
-
<a-input v-model="data[item.dataIndex][index]" :style="'width:' + (item.inputWidth ? item.inputWidth : '100') + '%'"/>
|
|
29
|
-
</template>
|
|
30
|
-
</template>
|
|
31
|
-
<template v-else>
|
|
32
|
-
{{ activatedConfig.data[item.dataIndex][index] }}
|
|
33
|
-
</template>
|
|
34
|
-
<span class="inputsDivItemLabel">{{ displayFormatText(item.format, index) }}</span>
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
|
-
</template>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
<!-- 主体表格 -->
|
|
41
|
-
<table class="reportTable" v-if="render" :style="activatedConfig.style ? activatedConfig.style : undefined">
|
|
42
|
-
<tbody class="reportTable">
|
|
43
|
-
<template v-for="(row, rowIndex) in activatedConfig.columns">
|
|
44
|
-
<!-- 插槽展示 -->
|
|
45
|
-
<!-- <template v-if="row[0].type === 'slot'">-->
|
|
46
|
-
<!-- <XReportSlot :config="activatedConfig" v-if="render" :slot-config-name="row[0].slotConfig" :key="rowIndex" :for-display="forDisplay"></XReportSlot>-->
|
|
47
|
-
<!-- </template>-->
|
|
48
|
-
<!-- 普通行 -->
|
|
49
|
-
<template v-if="row[0].type !== 'inputColumns' && row[0].type !== 'list'">
|
|
50
|
-
<template v-if="!forDisplay">
|
|
51
|
-
<x-report-tr-group
|
|
52
|
-
:key="rowIndex"
|
|
53
|
-
:columns="row"
|
|
54
|
-
:no-top-border="noTopBorder"
|
|
55
|
-
:config-data="activatedConfig.data"
|
|
56
|
-
:config="activatedConfig">
|
|
57
|
-
</x-report-tr-group>
|
|
58
|
-
</template>
|
|
59
|
-
<template v-else>
|
|
60
|
-
<x-report-tr-group
|
|
61
|
-
:config="activatedConfig"
|
|
62
|
-
:key="rowIndex"
|
|
63
|
-
:columns="row"
|
|
64
|
-
:no-top-border="noTopBorder"
|
|
65
|
-
:config-data="activatedConfig.data"
|
|
66
|
-
:display="true">
|
|
67
|
-
</x-report-tr-group>
|
|
68
|
-
</template>
|
|
69
|
-
</template>
|
|
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
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
:config
|
|
101
|
-
:
|
|
102
|
-
:
|
|
103
|
-
|
|
104
|
-
:
|
|
105
|
-
|
|
106
|
-
:
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
:config
|
|
113
|
-
:
|
|
114
|
-
:
|
|
115
|
-
|
|
116
|
-
:
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
:
|
|
123
|
-
:
|
|
124
|
-
:
|
|
125
|
-
:
|
|
126
|
-
:
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
</template>
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
import
|
|
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
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
this.
|
|
249
|
-
|
|
250
|
-
this.
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
.
|
|
340
|
-
display: flex;
|
|
341
|
-
justify-content: space-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
.
|
|
382
|
-
display: flex;
|
|
383
|
-
justify-content: space-between;
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<template v-if="this.activatedConfig.designMode === 'json'">
|
|
4
|
+
<XReportJsonRender
|
|
5
|
+
:no-padding="noPadding"
|
|
6
|
+
:no-top-border="noTopBorder"
|
|
7
|
+
:config="activatedConfig"/>
|
|
8
|
+
</template>
|
|
9
|
+
<template v-else>
|
|
10
|
+
<div :class=" noPadding ? 'reportMainNoPadding' : 'reportMain'" :style="activatedConfig.width > 0 ? ('width:' + activatedConfig.width + 'px') : undefined">
|
|
11
|
+
<!-- 大标题 -->
|
|
12
|
+
<h2 class="reportTitle" v-if="activatedConfig.title" v-html="activatedConfig.title"></h2>
|
|
13
|
+
<!-- 小标题 / 介乎于标题与表格之间的内容 -->
|
|
14
|
+
<div class="subTitle" v-if="activatedConfig.subTitle">
|
|
15
|
+
<div class="subTitleItems" v-for="(item, itemIndex) in activatedConfig.subTitle" :key="itemIndex">
|
|
16
|
+
<template v-if="item.type === 'column'">
|
|
17
|
+
<span>{{ item.text }}</span>
|
|
18
|
+
</template>
|
|
19
|
+
<template v-else-if="item.type === 'inputs'">
|
|
20
|
+
<div class="inputsDiv">
|
|
21
|
+
<div class="inputsDivItem" v-for="(num, index) of calcFormatInputNum(item.format)" :key="index">
|
|
22
|
+
<span class="inputsDivItemLabel">{{ displayFormatStartText(item.format) }}</span>
|
|
23
|
+
<template v-if="!forDisplay">
|
|
24
|
+
<template v-if="item.inputReadOnly === true">
|
|
25
|
+
<a-input v-model="data[item.dataIndex][index]" :style="'width:' + (item.inputWidth ? item.inputWidth : '100') + '%'" :disabled="true"/>
|
|
26
|
+
</template>
|
|
27
|
+
<template v-else>
|
|
28
|
+
<a-input v-model="data[item.dataIndex][index]" :style="'width:' + (item.inputWidth ? item.inputWidth : '100') + '%'"/>
|
|
29
|
+
</template>
|
|
30
|
+
</template>
|
|
31
|
+
<template v-else>
|
|
32
|
+
{{ activatedConfig.data[item.dataIndex][index] }}
|
|
33
|
+
</template>
|
|
34
|
+
<span class="inputsDivItemLabel">{{ displayFormatText(item.format, index) }}</span>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
</template>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
<!-- 主体表格 -->
|
|
41
|
+
<table class="reportTable" v-if="render" :style="activatedConfig.style ? activatedConfig.style : undefined">
|
|
42
|
+
<tbody class="reportTable">
|
|
43
|
+
<template v-for="(row, rowIndex) in activatedConfig.columns">
|
|
44
|
+
<!-- 插槽展示 -->
|
|
45
|
+
<!-- <template v-if="row[0].type === 'slot'">-->
|
|
46
|
+
<!-- <XReportSlot :config="activatedConfig" v-if="render" :slot-config-name="row[0].slotConfig" :key="rowIndex" :for-display="forDisplay"></XReportSlot>-->
|
|
47
|
+
<!-- </template>-->
|
|
48
|
+
<!-- 普通行 -->
|
|
49
|
+
<template v-if="row[0].type !== 'inputColumns' && row[0].type !== 'list'">
|
|
50
|
+
<template v-if="!forDisplay">
|
|
51
|
+
<x-report-tr-group
|
|
52
|
+
:key="rowIndex"
|
|
53
|
+
:columns="row"
|
|
54
|
+
:no-top-border="noTopBorder"
|
|
55
|
+
:config-data="activatedConfig.data"
|
|
56
|
+
:config="activatedConfig">
|
|
57
|
+
</x-report-tr-group>
|
|
58
|
+
</template>
|
|
59
|
+
<template v-else>
|
|
60
|
+
<x-report-tr-group
|
|
61
|
+
:config="activatedConfig"
|
|
62
|
+
:key="rowIndex"
|
|
63
|
+
:columns="row"
|
|
64
|
+
:no-top-border="noTopBorder"
|
|
65
|
+
:config-data="activatedConfig.data"
|
|
66
|
+
:display="true">
|
|
67
|
+
</x-report-tr-group>
|
|
68
|
+
</template>
|
|
69
|
+
</template>
|
|
70
|
+
<!-- 列表 -->
|
|
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>
|
|
94
|
+
</template>
|
|
95
|
+
</template>
|
|
96
|
+
<!-- 动态行 -->
|
|
97
|
+
<template v-else>
|
|
98
|
+
<template v-if="forDisplay">
|
|
99
|
+
<x-report-tr-group
|
|
100
|
+
:config="activatedConfig"
|
|
101
|
+
:columns="row[0].definition"
|
|
102
|
+
:config-data="{arr: activatedConfig.data[row[0].dataIndex]}"
|
|
103
|
+
:input-columns="true"
|
|
104
|
+
:no-top-border="noTopBorder"
|
|
105
|
+
v-for="(item, definitionIndex) in activatedConfig.data[row[0].dataIndex]"
|
|
106
|
+
:input-columns-definition-index="definitionIndex"
|
|
107
|
+
:display="true"
|
|
108
|
+
:key="row[0].dataIndex + definitionIndex + rowIndex"></x-report-tr-group>
|
|
109
|
+
</template>
|
|
110
|
+
<template v-if="!forDisplay">
|
|
111
|
+
<x-report-tr-group
|
|
112
|
+
:config="activatedConfig"
|
|
113
|
+
:columns="row[0].definition"
|
|
114
|
+
:config-data="{arr: activatedConfig.data[row[0].dataIndex]}"
|
|
115
|
+
:input-columns="true"
|
|
116
|
+
:no-top-border="noTopBorder"
|
|
117
|
+
v-for="(item, definitionIndex) in activatedConfig.data[row[0].dataIndex]"
|
|
118
|
+
:input-columns-definition-index="definitionIndex"
|
|
119
|
+
:key="row[0].dataIndex + definitionIndex + rowIndex"></x-report-tr-group>
|
|
120
|
+
<!-- 动态行交互按钮 -->
|
|
121
|
+
<x-report-tr-group
|
|
122
|
+
:config="activatedConfig"
|
|
123
|
+
:key="rowIndex"
|
|
124
|
+
:columns="row"
|
|
125
|
+
:no-top-border="noTopBorder"
|
|
126
|
+
:config-data="activatedConfig.data"
|
|
127
|
+
:input-columns-button="true"
|
|
128
|
+
:input-columns="true">
|
|
129
|
+
</x-report-tr-group>
|
|
130
|
+
</template>
|
|
131
|
+
</template>
|
|
132
|
+
</template>
|
|
133
|
+
</tbody>
|
|
134
|
+
</table>
|
|
135
|
+
<div v-if="showImages" style="margin-top: 5%; display: flex;margin-bottom: 5%">
|
|
136
|
+
<p>图片:</p>
|
|
137
|
+
<template v-for="(img,imgIndex) in imageList">
|
|
138
|
+
<div :key="imgIndex" style="margin-left: 3%;width: 200px">
|
|
139
|
+
<img :src="img.url" class="img" :alt="img.name"/>
|
|
140
|
+
<p style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;width: 100%;">{{ img.name }}</p>
|
|
141
|
+
</div>
|
|
142
|
+
</template>
|
|
143
|
+
</div>
|
|
144
|
+
</div>
|
|
145
|
+
</template>
|
|
146
|
+
</div>
|
|
147
|
+
</template>
|
|
148
|
+
|
|
149
|
+
<script>
|
|
150
|
+
import XReportTrGroup from '@vue2-client/base-client/components/common/XReport/XReportTrGroup.vue'
|
|
151
|
+
import XReportJsonRender from '@vue2-client/base-client/components/common/XReport/XReportJsonRender.vue'
|
|
152
|
+
import { getConfigByName } from '@vue2-client/services/api/common'
|
|
153
|
+
|
|
154
|
+
export default {
|
|
155
|
+
name: 'XReportDesign',
|
|
156
|
+
props: {
|
|
157
|
+
config: {
|
|
158
|
+
type: Object,
|
|
159
|
+
require: true,
|
|
160
|
+
default: () => {}
|
|
161
|
+
},
|
|
162
|
+
forDisplay: {
|
|
163
|
+
type: Boolean,
|
|
164
|
+
default: false
|
|
165
|
+
},
|
|
166
|
+
slotConfigName: {
|
|
167
|
+
type: String,
|
|
168
|
+
default: undefined
|
|
169
|
+
},
|
|
170
|
+
showImages: {
|
|
171
|
+
type: Boolean,
|
|
172
|
+
default: false
|
|
173
|
+
},
|
|
174
|
+
imageList: {
|
|
175
|
+
type: Array,
|
|
176
|
+
default: undefined
|
|
177
|
+
},
|
|
178
|
+
noPadding: {
|
|
179
|
+
type: Boolean,
|
|
180
|
+
default: false
|
|
181
|
+
},
|
|
182
|
+
noTopBorder: {
|
|
183
|
+
type: Boolean,
|
|
184
|
+
default: false
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
components: {
|
|
188
|
+
XReportTrGroup,
|
|
189
|
+
XReportJsonRender
|
|
190
|
+
},
|
|
191
|
+
data () {
|
|
192
|
+
return {
|
|
193
|
+
data: this.config.data,
|
|
194
|
+
slotConfig: undefined,
|
|
195
|
+
render: false,
|
|
196
|
+
activatedConfig: {}
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
methods: {
|
|
200
|
+
// 根据format计算需要多少个输入框
|
|
201
|
+
calcFormatInputNum (formatStr) {
|
|
202
|
+
let count = 0
|
|
203
|
+
for (let i = 0; i < formatStr.length; i++) {
|
|
204
|
+
if (formatStr[i] == '{') {
|
|
205
|
+
count++
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
return count
|
|
209
|
+
},
|
|
210
|
+
// 根据format计算输入框之后的文字显示
|
|
211
|
+
displayFormatText (formatStr, num) {
|
|
212
|
+
let start = 0
|
|
213
|
+
let count = 0
|
|
214
|
+
num++
|
|
215
|
+
for (let i = 0; i < formatStr.length; i++) {
|
|
216
|
+
if (formatStr[i] === '}') {
|
|
217
|
+
start = i
|
|
218
|
+
count++
|
|
219
|
+
}
|
|
220
|
+
if (count === num) {
|
|
221
|
+
for (let j = start + 1; j < formatStr.length; j++) {
|
|
222
|
+
if (formatStr[j] === '{') {
|
|
223
|
+
return formatStr.slice(start + 1, j)
|
|
224
|
+
}
|
|
225
|
+
if (j === formatStr.length - 1 && formatStr[j] !== '}') {
|
|
226
|
+
return formatStr[j]
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
// 根据format计算输入框之前的文字显示
|
|
233
|
+
displayFormatStartText (formatStr) {
|
|
234
|
+
let count = 0
|
|
235
|
+
for (let i = 0; i < formatStr.length; i++) {
|
|
236
|
+
if (formatStr[i] === '{') {
|
|
237
|
+
break
|
|
238
|
+
} else {
|
|
239
|
+
count++
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
return formatStr.slice(0, count)
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
created () {
|
|
246
|
+
if (this.slotConfigName) {
|
|
247
|
+
getConfigByName(this.slotConfigName, undefined, res => {
|
|
248
|
+
this.slotConfig = res
|
|
249
|
+
res.data = { ...res.data, ...this.data }
|
|
250
|
+
this.config.data = res.data
|
|
251
|
+
this.activatedConfig = res
|
|
252
|
+
this.render = true
|
|
253
|
+
})
|
|
254
|
+
} else {
|
|
255
|
+
this.activatedConfig = this.config
|
|
256
|
+
this.render = true
|
|
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
|
+
})
|
|
265
|
+
},
|
|
266
|
+
watch: {
|
|
267
|
+
config: {
|
|
268
|
+
deep: true,
|
|
269
|
+
handler (newVal) {
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
</script>
|
|
275
|
+
|
|
276
|
+
<style lang="less" scoped>
|
|
277
|
+
.img{
|
|
278
|
+
width: 95%;
|
|
279
|
+
height: 180px;
|
|
280
|
+
object-fit: cover;
|
|
281
|
+
}
|
|
282
|
+
.reportMain {
|
|
283
|
+
text-align: center;
|
|
284
|
+
margin: 0 auto;
|
|
285
|
+
font-size: 16px;
|
|
286
|
+
color: #000;
|
|
287
|
+
background-color: #fff;
|
|
288
|
+
padding: 15px;
|
|
289
|
+
border-radius: 8px;
|
|
290
|
+
|
|
291
|
+
.reportTitle {
|
|
292
|
+
font-weight: bold;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.subTitle {
|
|
296
|
+
display: flex;
|
|
297
|
+
justify-content: space-between;
|
|
298
|
+
margin-bottom: 1%;
|
|
299
|
+
|
|
300
|
+
.subTitleItems {
|
|
301
|
+
max-width: 30%;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.inputsDiv {
|
|
306
|
+
display: flex;
|
|
307
|
+
justify-content: space-between;
|
|
308
|
+
.inputsDivItem {
|
|
309
|
+
display: flex;
|
|
310
|
+
align-items: center;
|
|
311
|
+
padding: 0 4px;
|
|
312
|
+
white-space: nowrap;
|
|
313
|
+
.inputsDivItemLabel {
|
|
314
|
+
padding: 0 4px;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.reportTable {
|
|
320
|
+
width: 100%;
|
|
321
|
+
border-collapse: collapse;
|
|
322
|
+
table-layout:fixed;
|
|
323
|
+
word-break:break-all;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
.reportMainForDisplay {
|
|
327
|
+
text-align: center;
|
|
328
|
+
margin: 10% auto;
|
|
329
|
+
font-size: 16px;
|
|
330
|
+
color: #000;
|
|
331
|
+
background-color: #fff;
|
|
332
|
+
padding: 15px;
|
|
333
|
+
border-radius: 8px;
|
|
334
|
+
|
|
335
|
+
.reportTitle {
|
|
336
|
+
font-weight: bold;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
.subTitle {
|
|
340
|
+
display: flex;
|
|
341
|
+
justify-content: space-between;
|
|
342
|
+
|
|
343
|
+
.subTitleItems {
|
|
344
|
+
max-width: 30%;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
.inputsDiv {
|
|
349
|
+
display: flex;
|
|
350
|
+
justify-content: space-around;
|
|
351
|
+
.inputsDivItem {
|
|
352
|
+
display: flex;
|
|
353
|
+
align-items: center;
|
|
354
|
+
padding: 0 4px;
|
|
355
|
+
white-space: nowrap;
|
|
356
|
+
.inputsDivItemLabel {
|
|
357
|
+
padding: 0 4px;
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
.reportTable {
|
|
363
|
+
width: 100%;
|
|
364
|
+
border-collapse: collapse;
|
|
365
|
+
table-layout:fixed;
|
|
366
|
+
word-break:break-all;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
.reportMainNoPadding {
|
|
370
|
+
text-align: center;
|
|
371
|
+
margin: 0 auto;
|
|
372
|
+
font-size: 16px;
|
|
373
|
+
color: #000;
|
|
374
|
+
background-color: #fff;
|
|
375
|
+
border-radius: 8px;
|
|
376
|
+
|
|
377
|
+
.reportTitle {
|
|
378
|
+
font-weight: bold;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.subTitle {
|
|
382
|
+
display: flex;
|
|
383
|
+
justify-content: space-between;
|
|
384
|
+
|
|
385
|
+
.subTitleItems {
|
|
386
|
+
max-width: 30%;
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
.inputsDiv {
|
|
391
|
+
display: flex;
|
|
392
|
+
justify-content: space-between;
|
|
393
|
+
.inputsDivItem {
|
|
394
|
+
display: flex;
|
|
395
|
+
align-items: center;
|
|
396
|
+
padding: 0 4px;
|
|
397
|
+
white-space: nowrap;
|
|
398
|
+
.inputsDivItemLabel {
|
|
399
|
+
padding: 0 4px;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
.reportTable {
|
|
405
|
+
width: 100%;
|
|
406
|
+
border-collapse: collapse;
|
|
407
|
+
table-layout:fixed;
|
|
408
|
+
word-break:break-all;
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
.tools{
|
|
412
|
+
position: fixed;
|
|
413
|
+
right: 2%;
|
|
414
|
+
text-align: right;
|
|
415
|
+
width: 60%;
|
|
416
|
+
cursor: pointer;
|
|
417
|
+
.toolsItem{
|
|
418
|
+
width: 15%;
|
|
419
|
+
margin-right: 3%;
|
|
420
|
+
display: inline-block;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
</style>
|