|
|
1
|
+<#assign CACHE_VERSION = "v=1.0.44">
|
|
|
2
|
+<#assign config_id = "${id!''}">
|
|
|
3
|
+<!DOCTYPE html>
|
|
|
4
|
+<html>
|
|
|
5
|
+<head>
|
|
|
6
|
+ <meta charset="utf-8">
|
|
|
7
|
+ <meta name="viewport" content="width=device-width">
|
|
|
8
|
+ <title>报表设计器 - 积木报表, 免费可视化报表工具!</title>
|
|
|
9
|
+
|
|
|
10
|
+ <script>
|
|
|
11
|
+ let base = "${base}";
|
|
|
12
|
+ let baseFull = "${base}"+"${customPrePath}";
|
|
|
13
|
+ reportConfigString = '${reportConfig}';
|
|
|
14
|
+ /**
|
|
|
15
|
+ * 获取url参数
|
|
|
16
|
+ */
|
|
|
17
|
+ function getRequestUrl() {
|
|
|
18
|
+ var url = location.search;
|
|
|
19
|
+ var theRequest = new Object();
|
|
|
20
|
+ if (url.indexOf("?") != -1) {
|
|
|
21
|
+ var str = url.substr(1);
|
|
|
22
|
+ strs = str.split("&");
|
|
|
23
|
+ for(var i = 0; i < strs.length; i++) {
|
|
|
24
|
+ theRequest[strs[i].split("=")[0]]=decodeURI(strs[i].split("=")[1]);
|
|
|
25
|
+ }
|
|
|
26
|
+ }
|
|
|
27
|
+ return theRequest;
|
|
|
28
|
+ }
|
|
|
29
|
+
|
|
|
30
|
+ let token = getRequestUrl().token;
|
|
|
31
|
+ if (token == "" || token == null){
|
|
|
32
|
+ token = window.localStorage.getItem('JmReport-Access-Token');
|
|
|
33
|
+ }
|
|
|
34
|
+ window.localStorage.setItem('JmReport-Access-Token',token);
|
|
|
35
|
+ </script>
|
|
|
36
|
+ <!--引入公共资源-->
|
|
|
37
|
+ <#include "./common/resource.ftl">
|
|
|
38
|
+ <link rel="stylesheet" href="${base}${customPrePath}/jmreport/desreport_/corelib/report.css">
|
|
|
39
|
+ <link rel="stylesheet" href="${base}${customPrePath}/jmreport/desreport_/corelib/jmsheet.css?${CACHE_VERSION}">
|
|
|
40
|
+ <link rel="shortcut icon" href="${base}${customPrePath}/jmreport/desreport_/corelib/logo.png?${CACHE_VERSION}" type="image/x-ico">
|
|
|
41
|
+ <script src="${base}${customPrePath}/jmreport/desreport_/corelib/jmsheet.js?${CACHE_VERSION}"></script>
|
|
|
42
|
+ <script src="${base}${customPrePath}/jmreport/desreport_/corelib/locale/zh-cn.js?${CACHE_VERSION}"></script>
|
|
|
43
|
+ <script src="${base}${customPrePath}/jmreport/desreport_/jquery/jquery-3.4.1.min.js"></script>
|
|
|
44
|
+ <script src="${base}${customPrePath}/jmreport/desreport_/cdn/html2canvas/html2canvas.min.js"></script>
|
|
|
45
|
+ <script src="${base}${customPrePath}/jmreport/desreport_/cdn/html2canvas/canvas2image.js"></script>
|
|
|
46
|
+ <script src="${base}${customPrePath}/jmreport/desreport_/js/config/chart_type_list.js?${CACHE_VERSION}"></script>
|
|
|
47
|
+ <script src="${base}${customPrePath}/jmreport/desreport_/js/config/map_type_list.js?${CACHE_VERSION}"></script>
|
|
|
48
|
+ <!--引入自定义组件-->
|
|
|
49
|
+ <#include "./template/index.ftl">
|
|
|
50
|
+ <style>
|
|
|
51
|
+ .ivu-form-item {
|
|
|
52
|
+ margin-bottom: 10px;
|
|
|
53
|
+ vertical-align: top;
|
|
|
54
|
+ zoom: 1;
|
|
|
55
|
+ }
|
|
|
56
|
+ .ivu-menu-vertical.ivu-menu-light:after {
|
|
|
57
|
+ content: '';
|
|
|
58
|
+ display: block;
|
|
|
59
|
+ width: 1px;
|
|
|
60
|
+ height: 100%;
|
|
|
61
|
+ background: #ffffff;
|
|
|
62
|
+ position: absolute;
|
|
|
63
|
+ top: 0;
|
|
|
64
|
+ bottom: 0;
|
|
|
65
|
+ right: 0;
|
|
|
66
|
+ z-index: 1;
|
|
|
67
|
+ }
|
|
|
68
|
+ .vertical-center-modal{
|
|
|
69
|
+ width: 100%;
|
|
|
70
|
+ height: 100%;
|
|
|
71
|
+ }
|
|
|
72
|
+ .ivu-select-dropdown.ivu-transfer-no-max-height {
|
|
|
73
|
+ max-height: none;
|
|
|
74
|
+ margin-left: 142px;
|
|
|
75
|
+ }
|
|
|
76
|
+
|
|
|
77
|
+ .ivurow{
|
|
|
78
|
+ position: relative;
|
|
|
79
|
+ margin-left: 0;
|
|
|
80
|
+ margin-right: 0;
|
|
|
81
|
+ margin-bottom: 5px;
|
|
|
82
|
+ height: auto;
|
|
|
83
|
+ zoom: 1;
|
|
|
84
|
+ display: -webkit-inline-box;
|
|
|
85
|
+ }
|
|
|
86
|
+ .ivu-col > div.chart-active{
|
|
|
87
|
+ border-color: blue;
|
|
|
88
|
+ box-shadow: 0px 0px 8px blue;
|
|
|
89
|
+ }
|
|
|
90
|
+ .ivu-col > div.chart-selected{
|
|
|
91
|
+ border-color: blue !important;
|
|
|
92
|
+ box-shadow: 0px 0px 8px blue;
|
|
|
93
|
+ }
|
|
|
94
|
+
|
|
|
95
|
+ .chart-modal-content .ivu-tabs-tabpane{
|
|
|
96
|
+ padding: 0 0 0 8px;
|
|
|
97
|
+ }
|
|
|
98
|
+ #dataTree{
|
|
|
99
|
+ margin-left: 25px;
|
|
|
100
|
+ }
|
|
|
101
|
+ .no-allowed{
|
|
|
102
|
+ cursor: not-allowed;
|
|
|
103
|
+ /* pointer-events: none;*/
|
|
|
104
|
+ }
|
|
|
105
|
+
|
|
|
106
|
+ .no-allowed:after {
|
|
|
107
|
+ position: absolute;
|
|
|
108
|
+ width: 200px;
|
|
|
109
|
+ height: 150px;
|
|
|
110
|
+ top: 0;
|
|
|
111
|
+ left: 0;
|
|
|
112
|
+ content: "";
|
|
|
113
|
+ background: #fff;
|
|
|
114
|
+ opacity: 0.65;
|
|
|
115
|
+ z-index: 5;
|
|
|
116
|
+ filter: alpha(opacity=40);
|
|
|
117
|
+ }
|
|
|
118
|
+ .colorPicker{
|
|
|
119
|
+ width: 200%;
|
|
|
120
|
+
|
|
|
121
|
+ }
|
|
|
122
|
+ .colorPicker .ivu-color-picker-input{
|
|
|
123
|
+ width: 20px;
|
|
|
124
|
+ height: 20px;
|
|
|
125
|
+ }
|
|
|
126
|
+ .colorPicker .ivu-color-picker-color{
|
|
|
127
|
+ margin-left: -5px;
|
|
|
128
|
+ margin-top: -2px;
|
|
|
129
|
+ }
|
|
|
130
|
+ .iSelect{
|
|
|
131
|
+ width: 145px !important;
|
|
|
132
|
+ }
|
|
|
133
|
+ .datastyle{
|
|
|
134
|
+ margin-bottom: 10px;
|
|
|
135
|
+ }
|
|
|
136
|
+ .blockDiv{
|
|
|
137
|
+ margin-left: 31px;margin-top: -10px;font-size: 12px;color: #000;
|
|
|
138
|
+ }
|
|
|
139
|
+
|
|
|
140
|
+ .jm-rp-left-container{
|
|
|
141
|
+ position: absolute;
|
|
|
142
|
+ top: 0;
|
|
|
143
|
+ left: 0;
|
|
|
144
|
+ }
|
|
|
145
|
+ .jm-rp-right-container{
|
|
|
146
|
+ position: absolute;
|
|
|
147
|
+ top: 0;
|
|
|
148
|
+ right: 0;
|
|
|
149
|
+ }
|
|
|
150
|
+ .jm-rp-designer{
|
|
|
151
|
+ position: absolute;
|
|
|
152
|
+ left: 220px;
|
|
|
153
|
+ width: calc(100% - 470px)
|
|
|
154
|
+ }
|
|
|
155
|
+ .jm-rp-designer.left{
|
|
|
156
|
+ left: 20px;
|
|
|
157
|
+ width: calc(100% - 260px)
|
|
|
158
|
+ }
|
|
|
159
|
+ .jm-rp-designer.right{
|
|
|
160
|
+ left: 220px;
|
|
|
161
|
+ width: calc(100% - 240px)
|
|
|
162
|
+ }
|
|
|
163
|
+ .jm-rp-designer.all{
|
|
|
164
|
+ left: 20px;
|
|
|
165
|
+ width: calc(100% - 40px)
|
|
|
166
|
+ }
|
|
|
167
|
+ [v-cloak] {
|
|
|
168
|
+ display: none;
|
|
|
169
|
+ }
|
|
|
170
|
+ .ivu-poptip-popper {
|
|
|
171
|
+ min-width: 100px;
|
|
|
172
|
+ }
|
|
|
173
|
+ .ivu-poptip-body-content-word-wrap {
|
|
|
174
|
+ text-align: center;
|
|
|
175
|
+ }
|
|
|
176
|
+
|
|
|
177
|
+ /*加载效果*/
|
|
|
178
|
+ .zindex-top{
|
|
|
179
|
+ z-index: 999;
|
|
|
180
|
+ }
|
|
|
181
|
+ .zindex-top .ivu-icon-ios-loading{
|
|
|
182
|
+ animation: cycle-spin 1s linear infinite;
|
|
|
183
|
+ }
|
|
|
184
|
+ @keyframes cycle-spin {
|
|
|
185
|
+ from { transform: rotate(0deg);}
|
|
|
186
|
+ 50% { transform: rotate(180deg);}
|
|
|
187
|
+ to { transform: rotate(360deg);}
|
|
|
188
|
+ }
|
|
|
189
|
+ .ivurow>p{
|
|
|
190
|
+ padding-top: 3px;
|
|
|
191
|
+ }
|
|
|
192
|
+ .dataSource .ivu-table:before{
|
|
|
193
|
+ background-color: #ffffff !important;
|
|
|
194
|
+ }
|
|
|
195
|
+ .match_setting .ivu-table:before{
|
|
|
196
|
+ background-color: #ffffff !important;
|
|
|
197
|
+ }
|
|
|
198
|
+ .pictorial-icon-upload{
|
|
|
199
|
+ width: 36px;
|
|
|
200
|
+ height:36px;
|
|
|
201
|
+ line-height: 36px;
|
|
|
202
|
+ position: relative;
|
|
|
203
|
+ }
|
|
|
204
|
+ .pictorial-icon-upload>.cover{
|
|
|
205
|
+ display: none;
|
|
|
206
|
+ position: absolute;
|
|
|
207
|
+ top: 0;
|
|
|
208
|
+ bottom: 0;
|
|
|
209
|
+ width: 67px;
|
|
|
210
|
+ height: 50px;
|
|
|
211
|
+ left: 0;
|
|
|
212
|
+ right: 0;
|
|
|
213
|
+ border-radius:3px;
|
|
|
214
|
+ text-align: center;
|
|
|
215
|
+ background: rgba(0,0,0,.6);
|
|
|
216
|
+ }
|
|
|
217
|
+ .pictorial-icon-upload:hover .cover{
|
|
|
218
|
+ padding-top: 10px;
|
|
|
219
|
+ display: block;
|
|
|
220
|
+ }
|
|
|
221
|
+ .cover i{
|
|
|
222
|
+ color: #fff;
|
|
|
223
|
+ font-size: 20px;
|
|
|
224
|
+ cursor: pointer;
|
|
|
225
|
+ }
|
|
|
226
|
+ .ivu-tooltip-inner {
|
|
|
227
|
+ font-size: 10px;
|
|
|
228
|
+ padding: 2px 8px;
|
|
|
229
|
+ min-height: 24px;
|
|
|
230
|
+ }
|
|
|
231
|
+ .ivu-menu-opened>.ivu-menu-submenu-title{
|
|
|
232
|
+ color:#2d8cf0;
|
|
|
233
|
+ }
|
|
|
234
|
+ .ivu-tree-title-selected{
|
|
|
235
|
+ background: none;
|
|
|
236
|
+ }
|
|
|
237
|
+ #dataTree .ivu-tree-title{
|
|
|
238
|
+ padding:0;
|
|
|
239
|
+ }
|
|
|
240
|
+
|
|
|
241
|
+ /*样式调整 输入框小一点 -begin*/
|
|
|
242
|
+ .little-input .ivu-input{
|
|
|
243
|
+ padding: 3px 7px;
|
|
|
244
|
+ height: 28px;
|
|
|
245
|
+ border-radius: 3px;
|
|
|
246
|
+ }
|
|
|
247
|
+ .little-input .ivu-select-selection,
|
|
|
248
|
+ .little-input .ivu-select-placeholder,
|
|
|
249
|
+ .little-input .ivu-select-selected-value{
|
|
|
250
|
+ height: 28px !important;
|
|
|
251
|
+ line-height: 28px !important;
|
|
|
252
|
+ }
|
|
|
253
|
+
|
|
|
254
|
+ .little-input .ivu-input-prefix i,
|
|
|
255
|
+ .little-input .ivu-input-suffix i{
|
|
|
256
|
+ line-height: 28px !important;
|
|
|
257
|
+ }
|
|
|
258
|
+ /*样式调整 输入框小一点 -begin*/
|
|
|
259
|
+
|
|
|
260
|
+ .excel-backgroud-st>.ivu-upload{
|
|
|
261
|
+ display: block !important;
|
|
|
262
|
+ }
|
|
|
263
|
+
|
|
|
264
|
+ /*删除弹窗样式 -begin*/
|
|
|
265
|
+ .modal-body-del {
|
|
|
266
|
+ padding: 15px 0 0 15px;
|
|
|
267
|
+ font-size: 13px;
|
|
|
268
|
+ font-weight:400;
|
|
|
269
|
+ border-top: 1px solid #e8e8e8;
|
|
|
270
|
+ /*border-bottom: 1px solid #e8e8e8;*/
|
|
|
271
|
+ }
|
|
|
272
|
+ /*删除弹窗样式-end*/
|
|
|
273
|
+
|
|
|
274
|
+ /*自定义表达式样式 -begin*/
|
|
|
275
|
+ .expression .fontColor{
|
|
|
276
|
+ color:#888;
|
|
|
277
|
+ font-size: 14px;
|
|
|
278
|
+ }
|
|
|
279
|
+ .expression .ivu-modal-body{
|
|
|
280
|
+ background: rgb(248,248,248);
|
|
|
281
|
+ }
|
|
|
282
|
+ .expression .expressionInput textarea{
|
|
|
283
|
+ height: 100px;
|
|
|
284
|
+ }
|
|
|
285
|
+ .expression .expressionHeight textarea{
|
|
|
286
|
+ height: calc(45vh);
|
|
|
287
|
+ }
|
|
|
288
|
+ .expression .functionDiv{
|
|
|
289
|
+ height: 200px;
|
|
|
290
|
+ border: 1px solid #dcdee2;
|
|
|
291
|
+ background: #ffffff;
|
|
|
292
|
+ }
|
|
|
293
|
+ .expression .leftFunction{
|
|
|
294
|
+ cursor: pointer;
|
|
|
295
|
+ }
|
|
|
296
|
+ .expression .leftFunctionSelect{
|
|
|
297
|
+ cursor: pointer;
|
|
|
298
|
+ background: #dcdee2;
|
|
|
299
|
+ }
|
|
|
300
|
+ .expression .functionDiv span{
|
|
|
301
|
+ margin-left: 10px;
|
|
|
302
|
+ }
|
|
|
303
|
+ .expression .childrenDiv{
|
|
|
304
|
+ height: 200px;
|
|
|
305
|
+ border: 1px solid #dcdee2;
|
|
|
306
|
+ background: #ffffff;
|
|
|
307
|
+ overflow-y: auto;
|
|
|
308
|
+ margin-left: 10px;
|
|
|
309
|
+ }
|
|
|
310
|
+ .expression .childrenDiv span{
|
|
|
311
|
+ margin-left: 10px;
|
|
|
312
|
+ }
|
|
|
313
|
+ .expression .activeItem{
|
|
|
314
|
+ cursor: pointer;
|
|
|
315
|
+ }
|
|
|
316
|
+ .expression .rightFunctionSelect{
|
|
|
317
|
+ cursor: pointer;
|
|
|
318
|
+ background: #dcdee2;
|
|
|
319
|
+ }
|
|
|
320
|
+ .ivu-btn-primary button{
|
|
|
321
|
+ color: white !important;
|
|
|
322
|
+ }
|
|
|
323
|
+ .expression .ivu-input:focus{
|
|
|
324
|
+ border-color: #dcdee2 !important;
|
|
|
325
|
+ -webkit-box-shadow:none !important;
|
|
|
326
|
+ box-shadow: none !important;
|
|
|
327
|
+ }
|
|
|
328
|
+ .expression .ivu-input:hover{
|
|
|
329
|
+ border-color: #dcdee2 !important;
|
|
|
330
|
+ }
|
|
|
331
|
+ .interpretation{
|
|
|
332
|
+ margin-left: 10px;
|
|
|
333
|
+ }
|
|
|
334
|
+ .interpretation p{
|
|
|
335
|
+ font-size: 12px;
|
|
|
336
|
+ color:#888;
|
|
|
337
|
+ word-wrap: break-word;
|
|
|
338
|
+ overflow-wrap: break-word;
|
|
|
339
|
+ }
|
|
|
340
|
+ /*自定义表达式样式 -end*/
|
|
|
341
|
+
|
|
|
342
|
+ /*去掉 excel div块的间距 使其贴住浏览器边线*/
|
|
|
343
|
+ #tableDiv .ivu-card-body{padding: 0}
|
|
|
344
|
+ #tableDiv .layout-content{margin: 0}
|
|
|
345
|
+ .jm-noScroll{ overflow: hidden; }
|
|
|
346
|
+ #propsDiv .ivu-card-body{padding: 16px 0 16px 8px !important;}
|
|
|
347
|
+ /*update-begin--Author:wangshuai Date:20210226 for:修改设计页面左右两侧的样式-------------------*/
|
|
|
348
|
+ .ivu-select-dropdown{
|
|
|
349
|
+ z-index: 999;
|
|
|
350
|
+ }
|
|
|
351
|
+ .dataSourceForm .ivu-form-item-label{
|
|
|
352
|
+ font-size: 12px;
|
|
|
353
|
+ }
|
|
|
354
|
+ .dataSourceForm .ivu-select-single .ivu-select-selection .ivu-select-selected-value{
|
|
|
355
|
+ font-size: 12px;
|
|
|
356
|
+ }
|
|
|
357
|
+ .rightFontSize{
|
|
|
358
|
+ font-size: 12px !important;
|
|
|
359
|
+ }
|
|
|
360
|
+ .rightFontSize .ivu-input{
|
|
|
361
|
+ font-size: 12px;
|
|
|
362
|
+ }
|
|
|
363
|
+ .rightFontSize .ivu-table-cell{
|
|
|
364
|
+ font-size: 12px;
|
|
|
365
|
+ }
|
|
|
366
|
+ /*右侧有两个文字的时候input的宽度*/
|
|
|
367
|
+ .twoInputWidth{
|
|
|
368
|
+ margin-left: 4px;
|
|
|
369
|
+ width: 165px !important;
|
|
|
370
|
+ }
|
|
|
371
|
+ .fourInputWidth{
|
|
|
372
|
+ margin-left: 4px;
|
|
|
373
|
+ width: 70% !important;
|
|
|
374
|
+ }
|
|
|
375
|
+ /*向上边距*/
|
|
|
376
|
+ .basicSettingTop{
|
|
|
377
|
+ margin-top: 15px;
|
|
|
378
|
+ }
|
|
|
379
|
+ #dataTree .ivu-tree ul{
|
|
|
380
|
+ font-size: 13px;
|
|
|
381
|
+ }
|
|
|
382
|
+ #dataTree .ivu-btn-icon-only.ivu-btn-small{
|
|
|
383
|
+ position: relative;
|
|
|
384
|
+ left: 14px;
|
|
|
385
|
+ }
|
|
|
386
|
+ #dataTree .ivu-tree-title{
|
|
|
387
|
+ width: 100%;
|
|
|
388
|
+ }
|
|
|
389
|
+ .reportIfo .ivu-menu-submenu-title{
|
|
|
390
|
+ width: 224px;
|
|
|
391
|
+ }
|
|
|
392
|
+ .rightPadding .ivu-card-body {
|
|
|
393
|
+ padding: 8px;
|
|
|
394
|
+ }
|
|
|
395
|
+ .rightPadding .ivu-form-item-content {
|
|
|
396
|
+ display: flex;
|
|
|
397
|
+ }
|
|
|
398
|
+ .rightPadding .ivu-menu-vertical .ivu-menu-submenu-title{
|
|
|
399
|
+ padding:14px 0;
|
|
|
400
|
+ }
|
|
|
401
|
+ .stylePadding .ivu-menu-vertical .ivu-menu-submenu-title{
|
|
|
402
|
+ padding:14px 30px;
|
|
|
403
|
+ }
|
|
|
404
|
+ .colorHeight .ivu-input-hide-icon .ivu-input-icon-normal+.ivu-input{
|
|
|
405
|
+ height: 24px !important;
|
|
|
406
|
+ }
|
|
|
407
|
+ .basic .ivu-menu-submenu-title{
|
|
|
408
|
+ width: 230px;
|
|
|
409
|
+ }
|
|
|
410
|
+ /*update-end--Author:wangshuai Date:20210226 for:修改设计页面左右两侧的样式-------------------*/
|
|
|
411
|
+ .ivu-table-header table{
|
|
|
412
|
+ width: 100% !important;
|
|
|
413
|
+ }
|
|
|
414
|
+ .icnoAlignment{
|
|
|
415
|
+ position:relative;
|
|
|
416
|
+ left: 169px;
|
|
|
417
|
+ }
|
|
|
418
|
+ .icnoLeft{
|
|
|
419
|
+ position:relative;
|
|
|
420
|
+ left: 0;
|
|
|
421
|
+ }
|
|
|
422
|
+ .icnoRight{
|
|
|
423
|
+ position:relative;
|
|
|
424
|
+ left: 169px;
|
|
|
425
|
+ }
|
|
|
426
|
+ .title-setting-fontsize .ivu-select-selected-value{
|
|
|
427
|
+ font-size: 10px !important;
|
|
|
428
|
+ }
|
|
|
429
|
+ .twoInputWidth .ivu-icon{
|
|
|
430
|
+ cursor: pointer;
|
|
|
431
|
+ }
|
|
|
432
|
+ .basicSettingTop .ivu-input{
|
|
|
433
|
+ padding-right: 32px;
|
|
|
434
|
+ }
|
|
|
435
|
+ #treeDiv .ivu-card-body{
|
|
|
436
|
+ padding: 16px 0 16px 16px !important;
|
|
|
437
|
+ }
|
|
|
438
|
+ .help-color{
|
|
|
439
|
+ color:#000000;
|
|
|
440
|
+ font-size: 10px;
|
|
|
441
|
+ }
|
|
|
442
|
+ .basic .layout-content{
|
|
|
443
|
+ margin: 10px 0 10px 10px;
|
|
|
444
|
+ }
|
|
|
445
|
+ .help-margin{
|
|
|
446
|
+ margin-right: 13px;
|
|
|
447
|
+ }
|
|
|
448
|
+ /*增强弹框样式*/
|
|
|
449
|
+ .jmreport-enhance .ivu-collapse-content{
|
|
|
450
|
+ padding: 0 5px;
|
|
|
451
|
+ }
|
|
|
452
|
+ .jmreport-enhance .ivu-collapse-content-box{
|
|
|
453
|
+ padding-top: 5px;
|
|
|
454
|
+ padding-bottom: 5px;
|
|
|
455
|
+ }
|
|
|
456
|
+ .jmreport-enhance textarea{
|
|
|
457
|
+ resize: none;
|
|
|
458
|
+ }
|
|
|
459
|
+ .ivu-spin-dot{
|
|
|
460
|
+ width: 70px!important;
|
|
|
461
|
+ height: 70px!important;
|
|
|
462
|
+ background: url(/jmreport/desreport_/logoimage/loading-mj.png) no-repeat center;
|
|
|
463
|
+ background-size: 70px 70px;
|
|
|
464
|
+ animation: sk-chase-dot 2.0s infinite ease-in-out both;
|
|
|
465
|
+ opacity: 1;
|
|
|
466
|
+ display: block;
|
|
|
467
|
+ margin-left: calc((100% - 70px)/2);
|
|
|
468
|
+ }
|
|
|
469
|
+
|
|
|
470
|
+ @keyframes sk-chase-dot {
|
|
|
471
|
+ 80%, 100% {
|
|
|
472
|
+ transform: rotate(360deg)
|
|
|
473
|
+ }
|
|
|
474
|
+ }
|
|
|
475
|
+ </style>
|
|
|
476
|
+<body onload="load()" class="jm-noScroll">
|
|
|
477
|
+<div id="app" v-cloak>
|
|
|
478
|
+ <Spin size="large" fix v-if="createLoading" class="zindex-top">
|
|
|
479
|
+ <Icon type="ios-loading" size=24></Icon>
|
|
|
480
|
+ <div>Loading</div>
|
|
|
481
|
+ </Spin>
|
|
|
482
|
+<#include "./modal.ftl">
|
|
|
483
|
+ <div class="layout">
|
|
|
484
|
+ <div class="jm-rp-left-container">
|
|
|
485
|
+ <div id="treeDiv">
|
|
|
486
|
+ <span slot="title" @click="toggleLeft" style="float: top;display: flex" class="icnoAlignment">
|
|
|
487
|
+ <span style="color: #000000;font-size: 12px;position: relative;top: 4px;" v-if="dataShow">收起</span> <Icon type="md-arrow-dropleft" size="24"/>
|
|
|
488
|
+ </span>
|
|
|
489
|
+ <!-- 数据源设置 -->
|
|
|
490
|
+ <j-data-source-setting ref="dataSource" @saveback="saveDbBack" @cancelback="cancelback"></j-data-source-setting>
|
|
|
491
|
+ <!-- javabean设置 -->
|
|
|
492
|
+ <j-javabean-setting ref="javabean" @saveback="saveDbBack" @cancelback="cancelback"></j-javabean-setting>
|
|
|
493
|
+ <card style="width: 221px;" v-if="dataShow" :style="{'overflowY':'auto', 'height':windowHeight+'px'}">
|
|
|
494
|
+ <template>
|
|
|
495
|
+ <div id="dataDiv">
|
|
|
496
|
+ <template>
|
|
|
497
|
+ <i-menu theme="light" style="margin-left: -25px;z-index: auto;width: auto !important;" :class="menuitemClasses">
|
|
|
498
|
+ <div style="width:95%;height: 30px;border: none;margin-left: 10px; z-index:999;cursor: pointer;margin-left:27px">
|
|
|
499
|
+ <span class="rightFontSize">数据集管理
|
|
|
500
|
+ <Tooltip :transfer="true" content="数据源管理文档" placement="left" class="jimu-tooltip">
|
|
|
501
|
+ <a class=" help-color" href="http://report.jeecg.com/1835711" target="_blank" style="margin-right: 15px"><Icon size="14" type="ios-help-circle-outline" style="margin-top: 4px;"/></a>
|
|
|
502
|
+ </Tooltip>
|
|
|
503
|
+ </span>
|
|
|
504
|
+ <Dropdown @on-click="onMenuSelect" placement="bottom-start" :transfer="true">
|
|
|
505
|
+ <a href="javascript:void(0)">
|
|
|
506
|
+ <Icon type="md-add" style="position:relative;left:89px"/>
|
|
|
507
|
+ </a>
|
|
|
508
|
+ <Dropdown-menu slot="list">
|
|
|
509
|
+ <Dropdown-item name="sqlInfo" class="rightFontSize">SQL数据集</Dropdown-item>
|
|
|
510
|
+ <Dropdown-item name="apiInfo" class="rightFontSize">API数据集</Dropdown-item>
|
|
|
511
|
+ <Dropdown-item name="javabean" class="rightFontSize">JavaBean数据集</Dropdown-item>
|
|
|
512
|
+ <Dropdown-item name="jsonInfo" class="rightFontSize">JSON数据集</Dropdown-item>
|
|
|
513
|
+ </Dropdown-menu>
|
|
|
514
|
+ </Dropdown>
|
|
|
515
|
+ </div>
|
|
|
516
|
+ <div id="dataTree">
|
|
|
517
|
+ <template v-for="(item,index) in treeData">
|
|
|
518
|
+ <Tree :data="item" @on-toggle-expand="onTreeToggleExpand" @on-select-change="changeTree"></Tree>
|
|
|
519
|
+ </template>
|
|
|
520
|
+ </div>
|
|
|
521
|
+
|
|
|
522
|
+ <Submenu name="reportIfo" class="reportIfo">
|
|
|
523
|
+ <template slot="title">
|
|
|
524
|
+ <span class="rightFontSize">报表信息</span>
|
|
|
525
|
+ </template>
|
|
|
526
|
+ <div style="height: 86px;line-height: 8px;margin-left: 25px;">
|
|
|
527
|
+ <div>
|
|
|
528
|
+ <i-form :model="designerObj" label-colon :label-width="90" class="dataSourceForm">
|
|
|
529
|
+ <div label="" class="rightFontSize">
|
|
|
530
|
+ <span>名称</span>
|
|
|
531
|
+ <i-input v-model="designerObj.name" placeholder="请输入名称" @on-blur="excelQueryName" @on-change="changeName" class="rightFontSize" style="margin-left: 4px; width: 132px;"></i-input>
|
|
|
532
|
+ </div>
|
|
|
533
|
+
|
|
|
534
|
+ <div class="dataSourceForm rightFontSize" style="margin-top: 10px">
|
|
|
535
|
+ <span>类型</span>
|
|
|
536
|
+ <i-select :transfer="true" :model.sync="designerObj.type" v-model="designerObj.type" style="margin-left: 4px; width: 132px;" @on-change="selectmenuList">
|
|
|
537
|
+ <i-option style="z-index: 9999" class="rightFontSize" v-for="item in menuList" :value="item.value">{{ item.label }}</i-option>
|
|
|
538
|
+ </i-select>
|
|
|
539
|
+ </div>
|
|
|
540
|
+ </i-form>
|
|
|
541
|
+ </div>
|
|
|
542
|
+ </div>
|
|
|
543
|
+ </Submenu>
|
|
|
544
|
+ <j-data-dictionary ref="dataDictionary"></j-data-dictionary>
|
|
|
545
|
+ <div style="width:100%;height: 45px;border: none;margin-left: 25px;cursor: pointer;margin-top: 10px">
|
|
|
546
|
+ <span @click="createDictClick" class="rightFontSize">数据字典<i style="position: relative;left:100px;font-size: 14px;" class="ivu-icon ivu-icon-md-create"></i></span>
|
|
|
547
|
+ <Tooltip :transfer="true" content="数据字典文档" placement="left" class="jimu-tooltip">
|
|
|
548
|
+ <a class="jimu-table-tip help-color" href="http://report.jeecg.com/2083759" target="_blank" style="margin-right: 26px;"><Icon size="14" type="ios-help-circle-outline" style="margin-top: 4px;"/></a>
|
|
|
549
|
+ </Tooltip>
|
|
|
550
|
+ </div>
|
|
|
551
|
+ </i-menu>
|
|
|
552
|
+ </template>
|
|
|
553
|
+ </div>
|
|
|
554
|
+ </template>
|
|
|
555
|
+ </card>
|
|
|
556
|
+ </div>
|
|
|
557
|
+ </div>
|
|
|
558
|
+
|
|
|
559
|
+ <div :class="centerDivClass">
|
|
|
560
|
+ <div id="tableDiv">
|
|
|
561
|
+ <Card>
|
|
|
562
|
+ <div class="layout-content" style="overflow: auto">
|
|
|
563
|
+ <div id="jm-sheet-wrapper" style="overflow:auto"></div>
|
|
|
564
|
+ </div>
|
|
|
565
|
+ </Card>
|
|
|
566
|
+ </div>
|
|
|
567
|
+ </div>
|
|
|
568
|
+ <div class="jm-rp-right-container">
|
|
|
569
|
+ <div id="propsDiv">
|
|
|
570
|
+ <span slot="title" @click="toggleRight">
|
|
|
571
|
+ <span style="color: #000000;font-size: 12px;position: relative;top: 4px;float: right;right:200px" v-if="propsContentShow">收起</span><Icon type="md-arrow-dropright" size="24"/>
|
|
|
572
|
+ </span>
|
|
|
573
|
+ <card style="width: 250px;height: 977px" v-if="propsContentShow" class="rightPadding">
|
|
|
574
|
+ <Tabs size="small" v-model="rightTabName" >
|
|
|
575
|
+
|
|
|
576
|
+ <!-- 基本设置 -->
|
|
|
577
|
+ <tab-pane label="基本" name="name1" :class="'little-input'" class="basic">
|
|
|
578
|
+ <div id="propsContentDiv" class="layout-content jm-setting-container" :style="{height: settingsHeight+'px'}">
|
|
|
579
|
+ <div class="dataSourceForm">
|
|
|
580
|
+ <div class="rightFontSize">
|
|
|
581
|
+ <span >坐标</span>
|
|
|
582
|
+ <i-input class="twoInputWidth" disabled v-model="excel.coordinate"></i-input>
|
|
|
583
|
+ </div>
|
|
|
584
|
+ <div class="basicSettingTop">
|
|
|
585
|
+ <span class="rightFontSize">类型</span>
|
|
|
586
|
+<#-- <p @click="customExpression">自定义表单式</p>-->
|
|
|
587
|
+ <i-select class="twoInputWidth" v-model="excel.type" @on-change="onChangeCellDisplay">
|
|
|
588
|
+ <i-option value="normal" key="1" class="rightFontSize">文本</i-option>
|
|
|
589
|
+ <i-option value="number" key="0" class="rightFontSize">数值</i-option>
|
|
|
590
|
+ <i-option value="img" key="2" class="rightFontSize">图片</i-option>
|
|
|
591
|
+ <i-option value="barcode" key="3" class="rightFontSize">条形码</i-option>
|
|
|
592
|
+ <i-option value="qrcode" key="4" class="rightFontSize">二维码</i-option>
|
|
|
593
|
+ <#--<i-option value="chart" key="5">图表</i-option>-->
|
|
|
594
|
+ </i-select>
|
|
|
595
|
+ </div>
|
|
|
596
|
+ <div class="basicSettingTop rightFontSize">
|
|
|
597
|
+ <span>值</span>
|
|
|
598
|
+ <i-input @on-click="enlargeInputClick" icon="md-contract" style="margin-left: 16px;" v-model="excel.excelValue" @keyup.enter.native="submitValue" @on-blur="submitValue" class="twoInputWidth"></i-input>
|
|
|
599
|
+ </div>
|
|
|
600
|
+
|
|
|
601
|
+ <div class="basicSettingTop rightFontSize">
|
|
|
602
|
+ <span >宽度</span>
|
|
|
603
|
+ <i-input title="输入完值回车生效!" placeholder="输入完值回车生效!" v-model="excel.width" @keyup.enter.native="handleChangeCellWidth" @on-blur="handleChangeCellWidth" class="twoInputWidth" :disabled="excel.isMergeCell"></i-input>
|
|
|
604
|
+ </div>
|
|
|
605
|
+
|
|
|
606
|
+ <div class="rightFontSize basicSettingTop">
|
|
|
607
|
+ <span >高度</span>
|
|
|
608
|
+ <i-input title="输入完值回车生效!" placeholder="输入完值回车生效!" v-model="excel.height" @on-change="handleChangeCellHeight" class="twoInputWidth" :disabled="excel.isMergeCell"></i-input>
|
|
|
609
|
+ </div>
|
|
|
610
|
+
|
|
|
611
|
+ <i-menu theme="light" width="100%" :class="menuitemClasses">
|
|
|
612
|
+
|
|
|
613
|
+ <Submenu name="blankRowSetting">
|
|
|
614
|
+ <template slot="title">
|
|
|
615
|
+ <span class="rightFontSize">补充空白行
|
|
|
616
|
+ <Tooltip :transfer="true" content="补充空白行文档" placement="left" class="jimu-tooltip">
|
|
|
617
|
+ <a class="jimu-table-tip help-color help-margin" href="http://report.jeecg.com/2361240" target="_blank"><Icon size="14" type="ios-help-circle-outline" style="margin-top: 2px"/></a>
|
|
|
618
|
+ </Tooltip>
|
|
|
619
|
+ </span>
|
|
|
620
|
+ </template>
|
|
|
621
|
+ <div>
|
|
|
622
|
+ <div class="rightFontSize" style="padding-left:2px">
|
|
|
623
|
+ <Checkbox v-model="excel.completeBlankStatus" @on-change="onChangeCompleteBlankStatus">启用</Checkbox>
|
|
|
624
|
+ </div>
|
|
|
625
|
+ <div class="rightFontSize" style="margin-top:12px">
|
|
|
626
|
+ <span>数据行倍数:</span>
|
|
|
627
|
+ <i-input type="number" v-model="excel.completeBlankRow" @on-change="onChangeCompleteBlankRow" style="width:80px" class="rightFontSize"></i-input>
|
|
|
628
|
+ </div>
|
|
|
629
|
+ </div>
|
|
|
630
|
+ </Submenu>
|
|
|
631
|
+
|
|
|
632
|
+ <div v-if="excel.hasGroup">
|
|
|
633
|
+
|
|
|
634
|
+
|
|
|
635
|
+ <Submenu name="groupSetting">
|
|
|
636
|
+ <template slot="title">
|
|
|
637
|
+ <span class="rightFontSize">分组设置
|
|
|
638
|
+ <Tooltip :transfer="true" content="分组设置文档" placement="left" class="jimu-tooltip">
|
|
|
639
|
+ <a class="jimu-table-tip help-color help-margin" href="http://report.jeecg.com/2032023" target="_blank"><Icon size="14" type="ios-help-circle-outline" style="margin-top: 2px"/></a>
|
|
|
640
|
+ </Tooltip>
|
|
|
641
|
+ </span>
|
|
|
642
|
+ </template>
|
|
|
643
|
+ <div>
|
|
|
644
|
+ <div class="rightFontSize">
|
|
|
645
|
+ <span>聚合方式</span>
|
|
|
646
|
+ <i-select ref="excelPolyWay" :model.sync="excel.polyWay" v-model="excel.polyWay" @on-change="selectPolyList" class="fourInputWidth" :disabled="wayDisabled">
|
|
|
647
|
+ <i-option class="rightFontSize" v-for="item in polyWayList" :value="item.value">{{ item.label }}</i-option>
|
|
|
648
|
+ </i-select>
|
|
|
649
|
+ </div>
|
|
|
650
|
+ <div class="basicSettingTop rightFontSize">
|
|
|
651
|
+ <span>扩展方向</span>
|
|
|
652
|
+ <i-select :model.sync="excel.direction" v-model="excel.direction" @on-change="selectDirectionList" class="fourInputWidth">
|
|
|
653
|
+ <i-option class="rightFontSize" v-for="item in directionList" :value="item.value">{{ item.label }}</i-option>
|
|
|
654
|
+ </i-select>
|
|
|
655
|
+ </div>
|
|
|
656
|
+ <div class="basicSettingTop rightFontSize">
|
|
|
657
|
+ <span>排序方式</span>
|
|
|
658
|
+ <i-select :transfer="true" :model.sync="excel.sort" v-model="excel.sort" @on-change="selectSortList" class="fourInputWidth">
|
|
|
659
|
+ <i-option class="rightFontSize" v-for="item in sortType" :value="item.value">{{ item.label }}</i-option>
|
|
|
660
|
+ </i-select>
|
|
|
661
|
+ </div>
|
|
|
662
|
+ <div class="basicSettingTop rightFontSize">
|
|
|
663
|
+ <span>高级配置</span>
|
|
|
664
|
+ <i-select :transfer="true" :model.sync="excel.advanced" v-model="excel.advanced" @on-change="selectAdvancedList" class="fourInputWidth">
|
|
|
665
|
+ <i-option class="rightFontSize" v-for="item in advancedList" :value="item.value">{{ item.label }}</i-option>
|
|
|
666
|
+ </i-select>
|
|
|
667
|
+ </div>
|
|
|
668
|
+ </div>
|
|
|
669
|
+ </Submenu>
|
|
|
670
|
+ <!--分组小计设置-->
|
|
|
671
|
+ <Submenu name="subtotalSetting">
|
|
|
672
|
+ <template slot="title">
|
|
|
673
|
+ <span class="rightFontSize">小计设置
|
|
|
674
|
+ <Tooltip :transfer="true" content="分组小计文档" placement="left" class="jimu-tooltip">
|
|
|
675
|
+ <a class="jimu-table-tip help-color help-margin" href="http://report.jeecg.com/2276025" target="_blank"><Icon size="14" type="ios-help-circle-outline" style="margin-top: 2px"/></a>
|
|
|
676
|
+ </Tooltip>
|
|
|
677
|
+ </span>
|
|
|
678
|
+ </template>
|
|
|
679
|
+
|
|
|
680
|
+ <div class="rightFontSize" v-if="excel.funcname=='-1'">
|
|
|
681
|
+ <span>分组依据</span>
|
|
|
682
|
+ <i-select ref="excelSubtotal" v-model="excel.subtotal" @on-change="selectSubtotal" class="fourInputWidth">
|
|
|
683
|
+ <i-option class="rightFontSize" v-for="item in subtotalList" :value="item.value">{{ item.label }}</i-option>
|
|
|
684
|
+ </i-select>
|
|
|
685
|
+ </div>
|
|
|
686
|
+
|
|
|
687
|
+ <div :class="['rightFontSize',{'basicSettingTop':excel.subtotal=='-1'&&excel.funcname=='-1'}]" v-if="excel.subtotal=='-1'" >
|
|
|
688
|
+ <span>聚合方式</span>
|
|
|
689
|
+ <i-select ref="excelAggregate" v-model="excel.funcname" @on-change="selectAggregate" class="fourInputWidth">
|
|
|
690
|
+ <i-option class="rightFontSize" v-for="item in aggregateList" :value="item.value">{{ item.label }}</i-option>
|
|
|
691
|
+ </i-select>
|
|
|
692
|
+ </div>
|
|
|
693
|
+ </Submenu>
|
|
|
694
|
+ </div>
|
|
|
695
|
+
|
|
|
696
|
+
|
|
|
697
|
+ <Submenu name="hyperlinksSetting">
|
|
|
698
|
+ <template slot="title">
|
|
|
699
|
+ <span class="rightFontSize">超链接设置
|
|
|
700
|
+ <Tooltip :transfer="true" content="超链接文档" placement="left" class="jimu-tooltip">
|
|
|
701
|
+ <a class="jimu-table-tip help-color help-margin" href="http://report.jeecg.com/2306127" target="_blank"><Icon size="14" type="ios-help-circle-outline" style="margin-top: 2px"/></a>
|
|
|
702
|
+ </Tooltip>
|
|
|
703
|
+ </span>
|
|
|
704
|
+ </template>
|
|
|
705
|
+
|
|
|
706
|
+ <span class="rightFontSize">添加链接</span>
|
|
|
707
|
+ <Dropdown @on-click="onHyperlinksClick" placement="bottom-start" :transfer="true">
|
|
|
708
|
+ <a href="javascript:void(0)">
|
|
|
709
|
+ <Icon type="md-add" style="margin-left: 20px"/>
|
|
|
710
|
+ </a>
|
|
|
711
|
+ <Dropdown-menu slot="list">
|
|
|
712
|
+ <Dropdown-item name="2" class="rightFontSize">图表联动</Dropdown-item>
|
|
|
713
|
+ <Dropdown-item name="0" class="rightFontSize">报表钻取</Dropdown-item>
|
|
|
714
|
+ <Dropdown-item name="1" class="rightFontSize">网络报表</Dropdown-item>
|
|
|
715
|
+ </Dropdown-menu>
|
|
|
716
|
+ </Dropdown>
|
|
|
717
|
+
|
|
|
718
|
+ <i-table style="margin-top: 10px" class="rightFontSize" :columns="hyperlinks.columns" :data="hyperlinks.data"></i-table>
|
|
|
719
|
+ <j-hyperlinks-setting ref="hyperlinksModel" :excel="linkExcel" @lingcallback="lingCallBack"></j-hyperlinks-setting>
|
|
|
720
|
+
|
|
|
721
|
+ <j-chart-linkage ref="chartLinkage" @ok="chartLinkageConfigSuccess"></j-chart-linkage>
|
|
|
722
|
+
|
|
|
723
|
+ <j-cell-linkage ref="cellLinkage" @ok="cellLinkageConfigSuccess"></j-cell-linkage>
|
|
|
724
|
+
|
|
|
725
|
+ </Submenu>
|
|
|
726
|
+ <Submenu name="otherSetting">
|
|
|
727
|
+ <template slot="title">
|
|
|
728
|
+ <span class="rightFontSize">其他设置
|
|
|
729
|
+ <Tooltip :transfer="true" content="数据格式化文档" placement="left" class="jimu-tooltip">
|
|
|
730
|
+ <a class="jimu-table-tip help-color help-margin" href="http://report.jeecg.com/2084138" target="_blank"><Icon size="14" type="ios-help-circle-outline" style="margin-top: 2px"/></a>
|
|
|
731
|
+ </Tooltip>
|
|
|
732
|
+ </span>
|
|
|
733
|
+ </template>
|
|
|
734
|
+ <div class="rightFontSize">
|
|
|
735
|
+ <span>小数位数</span>
|
|
|
736
|
+ <i-input class="rightFontSize fourInputWidth" v-model="excel.decimalPlaces" @on-change="onChangeDecimalPlaces"></i-input>
|
|
|
737
|
+ </div>
|
|
|
738
|
+ <div class="rightFontSize" style="margin-top: 5px;padding:0 5px">
|
|
|
739
|
+ <i-button @click="showEnhanceConfig" icon="md-code-working" size="small" long type="primary" ghost>增强配置</i-button>
|
|
|
740
|
+ </div>
|
|
|
741
|
+ </Submenu>
|
|
|
742
|
+ <!--参数设置-->
|
|
|
743
|
+ <Submenu name="primarySubreportSetting">
|
|
|
744
|
+ <template slot="title">
|
|
|
745
|
+ <span class="rightFontSize">主子报表参数设置
|
|
|
746
|
+ <Tooltip :transfer="true" content="主子报表文档" placement="left" class="jimu-tooltip">
|
|
|
747
|
+ <a class="jimu-table-tip help-color help-margin" href="http://report.jeecg.com/2296481" target="_blank"><Icon size="14" type="ios-help-circle-outline" style="margin-top: 2px"/></a>
|
|
|
748
|
+ </Tooltip>
|
|
|
749
|
+ </span>
|
|
|
750
|
+ </template>
|
|
|
751
|
+ <i-button class="rightFontSize" @click="primarySubreportClick">新增</i-button>
|
|
|
752
|
+ <i-table style="margin-top: 10px" class="rightFontSize" :columns="primarySubreport.columns" :data="primarySubreport.data"></i-table>
|
|
|
753
|
+ <j-primary-sub-report ref="primarySubreportModal" @mainsubreport="mainsubreport"></j-primary-sub-report>
|
|
|
754
|
+ </Submenu>
|
|
|
755
|
+
|
|
|
756
|
+ <Submenu name="layerOffset" v-if="layerOffsetEnable">
|
|
|
757
|
+ <template slot="title">
|
|
|
758
|
+ <span class="rightFontSize">图片偏移量设置</span>
|
|
|
759
|
+ </template>
|
|
|
760
|
+ <div class="rightFontSize">
|
|
|
761
|
+ <span>横向偏移(px):</span>
|
|
|
762
|
+ <i-input type="number" style="margin-left: 10px;width:90px !important;" v-model="layerOffsetX" @on-change="handleChangeLayerOffset" class="twoInputWidth"></i-input>
|
|
|
763
|
+ </div>
|
|
|
764
|
+
|
|
|
765
|
+ <div class="rightFontSize" style="margin-top:12px">
|
|
|
766
|
+ <span>纵向偏移(px):</span>
|
|
|
767
|
+ <i-input type="number" style="margin-left: 10px;width:90px !important;" v-model="layerOffsetY" @on-change="handleChangeLayerOffset" class="twoInputWidth"></i-input>
|
|
|
768
|
+ </div>
|
|
|
769
|
+ </Submenu>
|
|
|
770
|
+
|
|
|
771
|
+ </i-menu>
|
|
|
772
|
+ </div>
|
|
|
773
|
+ </div>
|
|
|
774
|
+ </tab-pane>
|
|
|
775
|
+
|
|
|
776
|
+ <!-- 图表样式设置 -->
|
|
|
777
|
+ <tab-pane v-if="chartsflag && !backgroundSettingShow" label="样式" name="name2" :disabled="selectedChartType==='apiUrlType'" class="stylePadding">
|
|
|
778
|
+ <i-menu theme="light" width="auto" :style="{height: settingsHeight+'px', marginLeft: '-20px'}" :class="menuitemClasses" accordion>
|
|
|
779
|
+
|
|
|
780
|
+ <!-- 标题设置 -->
|
|
|
781
|
+ <j-title-setting v-if="titleSettings" @change="onSettingsChange" :settings="titleSettings"></j-title-setting>
|
|
|
782
|
+ <!-- 柱体设置 -->
|
|
|
783
|
+ <j-bar-setting v-if="barSettings" @change="onSeriesChange" :settings="barSettings" :is-multi-chart="isMultiChart"></j-bar-setting>
|
|
|
784
|
+ <!-- 线体设置 -->
|
|
|
785
|
+ <j-line-setting v-if="lineSettings" @change="onSeriesChange" :settings="lineSettings" :is-multi-chart="isMultiChart"></j-line-setting>
|
|
|
786
|
+ <!-- 饼图设置-->
|
|
|
787
|
+ <j-pie-setting v-if="pieSettings" @change="onSeriesChange" :settings="pieSettings"></j-pie-setting>
|
|
|
788
|
+ <!-- 边距设置-->
|
|
|
789
|
+ <j-margin-setting v-if="marginSettings" @change="onSeriesChange" :settings="marginSettings"></j-margin-setting>
|
|
|
790
|
+ <!-- 中心点设置-->
|
|
|
791
|
+ <j-central-point-setting v-if="centralPointSettings" @change="onSeriesChange" :settings="centralPointSettings"></j-central-point-setting>
|
|
|
792
|
+ <!-- 漏斗设置-->
|
|
|
793
|
+ <j-funnel-setting v-if="funnelSettings" @change="onSeriesChange" :settings="funnelSettings"></j-funnel-setting>
|
|
|
794
|
+ <!-- 象形图设置 -->
|
|
|
795
|
+ <j-pictorial-setting v-if="pictorialSettings" @change="onPictorialChange" @upload-success="pictorialIconUploadSuccess" :settings="pictorialSettings"></j-pictorial-setting>
|
|
|
796
|
+ <!-- 地图设置 -->
|
|
|
797
|
+ <j-map-setting ref="mapModal" v-if="mapGeoSettings" @change="onSettingsChange" :settings="mapGeoSettings"></j-map-setting>
|
|
|
798
|
+ <!-- 散点设置-->
|
|
|
799
|
+ <j-scatter-setting v-if="scatterSettings" @change="onSeriesChange" :settings="scatterSettings"></j-scatter-setting>
|
|
|
800
|
+ <!-- 雷达设置-->
|
|
|
801
|
+ <j-radar-setting v-if="radarSettings" @change="onSettingsChange" :settings="radarSettings"></j-radar-setting>
|
|
|
802
|
+ <!-- 仪表盘设置-->
|
|
|
803
|
+ <j-gauge-setting v-if="gaugeSettings" @change="onSeriesChange" :settings="gaugeSettings"></j-gauge-setting>
|
|
|
804
|
+ <!-- x轴设置-->
|
|
|
805
|
+ <j-xaxis-setting v-if="xAxisSettings" @change="onSettingsChange" :settings="xAxisSettings"></j-xaxis-setting>
|
|
|
806
|
+ <!-- y轴设置(settings支持数组)-->
|
|
|
807
|
+ <j-yaxis-setting v-if="yAxisSettings" @change="onSettingsChange" :settings="yAxisSettings"></j-yaxis-setting>
|
|
|
808
|
+ <!-- 数值设置-->
|
|
|
809
|
+ <j-series-setting v-if="seriesLabelSettings" @change="onSeriesChange" :settings="seriesLabelSettings"></j-series-setting>
|
|
|
810
|
+ <!-- 提示语设置-->
|
|
|
811
|
+ <j-tooltip-setting v-if="tooltipSettings" @change="onSettingsChange" :settings="tooltipSettings"></j-tooltip-setting>
|
|
|
812
|
+ <!-- 坐标轴边距设置-->
|
|
|
813
|
+ <j-grid-setting v-if="gridSettings" @change="onSettingsChange" :settings="gridSettings"></j-grid-setting>
|
|
|
814
|
+ <!-- 图例设置-->
|
|
|
815
|
+ <j-legend-setting v-if="legendSettings" @change="onSettingsChange" :settings="legendSettings"></j-legend-setting>
|
|
|
816
|
+ <!-- 自定义配色-->
|
|
|
817
|
+ <j-match-setting style="border-bottom: inset 1px;" v-if="graphSettings ||gaugeSettings ||funnelSettings || pieSettings || isMultiChart || selectedChartType.indexOf('multi')!=-1 || selectedChartType == 'radar.basic'" :chart-options="chartOptions" :data-settings="dataSettings" ></j-match-setting>
|
|
|
818
|
+ <!-- 背景设置-->
|
|
|
819
|
+ <j-background-setting @change="chartBackgroundChange" @upload-success="chartBackgroundUploadSuccess" @remove="removeChartBackground" :settings="chartBackground"></j-background-setting>
|
|
|
820
|
+ </i-menu>
|
|
|
821
|
+ </tab-pane>
|
|
|
822
|
+
|
|
|
823
|
+ <!-- 图表数据设置 -->
|
|
|
824
|
+ <tab-pane style="padding:10px 8px;" v-if="chartsflag && selectedChartType !== 'map.simple'" :label="dataLabel" name="name3" :class="'little-input'">
|
|
|
825
|
+ <div class="datastyle rightFontSize dataSourceForm">
|
|
|
826
|
+ <span>数据类型</span>
|
|
|
827
|
+ <i-select class="fourInputWidth" v-model="dataSettings.dataType" :disabled="selectedChartType==='apiUrlType'" @on-change="dataTypeChange">
|
|
|
828
|
+ <i-option class="rightFontSize" value="sql">SQL数据集</i-option>
|
|
|
829
|
+ <i-option class="rightFontSize" value="api">Api数据集</i-option>
|
|
|
830
|
+ <i-option class="rightFontSize" value="json">JSON数据集</i-option>
|
|
|
831
|
+ <i-option class="rightFontSize" value="javabean">JavaBean数据集</i-option>
|
|
|
832
|
+ </i-select>
|
|
|
833
|
+ </div>
|
|
|
834
|
+
|
|
|
835
|
+ <!-- api数据集 -->
|
|
|
836
|
+ <div class="datastyle rightFontSize dataSourceForm" v-if="dataSettings.dataType == 'api'">
|
|
|
837
|
+ <div class="datastyle">
|
|
|
838
|
+ <span style="margin-left: 7px">Api类型</span>
|
|
|
839
|
+ <i-select class="fourInputWidth" v-model="dataSettings.apiStatus" :disabled="selectedChartType==='apiUrlType'" @on-change="seriesOnChange">
|
|
|
840
|
+ <i-option class="rightFontSize" value="0">静态数据</i-option>
|
|
|
841
|
+ <i-option class="rightFontSize" value="1">动态数据</i-option>
|
|
|
842
|
+ <i-option class="rightFontSize" value="2">接口请求</i-option>
|
|
|
843
|
+ </i-select>
|
|
|
844
|
+ </div>
|
|
|
845
|
+ <div class="datastyle" v-if="dataSettings.apiStatus == '0'">
|
|
|
846
|
+ <span style="display: inline-block;text-align: left;width: calc(100% - 50px);">请自定义数据值:</span>
|
|
|
847
|
+ <i-button style="width: 44px;" size="small" type="primary" @click="addEchartInfoData">编辑</i-button>
|
|
|
848
|
+ </div>
|
|
|
849
|
+ <div class="datastyle" v-if="dataSettings.apiStatus == '2'">
|
|
|
850
|
+ <p>接口url: </p>
|
|
|
851
|
+ <i-input v-model="dataSettings.apiUrl" :autosize="true" type="textarea" placeholder="请输入接口地址..."></i-input>
|
|
|
852
|
+ </div>
|
|
|
853
|
+ <div class="datastyle rightFontSize dataSourceForm" v-if="dataSettings.apiStatus == '1'">
|
|
|
854
|
+ <div>
|
|
|
855
|
+ <span>绑定数据集:</span>
|
|
|
856
|
+ <i-select style="width: 136px" v-model="dataSettings.dataId" @on-change="onSelectApiData">
|
|
|
857
|
+ <i-option class="rightFontSize" v-for="item in apiDataList" :value="item.dbId">{{ item.title }}</i-option>
|
|
|
858
|
+ </i-select>
|
|
|
859
|
+ </div>
|
|
|
860
|
+ </div>
|
|
|
861
|
+ </div>
|
|
|
862
|
+
|
|
|
863
|
+ <!-- sql数据集 -->
|
|
|
864
|
+ <div class="datastyle rightFontSize dataSourceForm" v-if="dataSettings.dataType == 'sql'">
|
|
|
865
|
+ <div class="datastyle">
|
|
|
866
|
+ <span>绑定数据集:</span>
|
|
|
867
|
+ <i-select style="width: 136px" v-model="dataSettings.dataId" @on-change="onSelectSqlData">
|
|
|
868
|
+ <i-option class="rightFontSize" v-for="item in sqlDataList" :value="item.dbId">{{ item.title }}</i-option>
|
|
|
869
|
+ </i-select>
|
|
|
870
|
+ </div>
|
|
|
871
|
+ <div class="datastyle">
|
|
|
872
|
+ <span>分类属性:</span>
|
|
|
873
|
+ <i-select class="fourInputWidth" v-model="dataSettings.axisX" @on-change="onAxisXConfigChange">
|
|
|
874
|
+ <i-option class="rightFontSize" v-for="item in sqlDataFieldList" :value="item.title">{{ item.fieldText }}</i-option>
|
|
|
875
|
+ </i-select>
|
|
|
876
|
+ </div>
|
|
|
877
|
+ <div class="datastyle">
|
|
|
878
|
+ <span style="margin-left: 12px">值属性:</span>
|
|
|
879
|
+ <i-select class="fourInputWidth" :model.sync="dataSettings.axisY" v-model="dataSettings.axisY" @on-change="onAxisYConfigChange">
|
|
|
880
|
+ <i-option class="rightFontSize" v-for="item in sqlDataFieldList" :value="item.title">{{ item.fieldText }}</i-option>
|
|
|
881
|
+ </i-select>
|
|
|
882
|
+ </div>
|
|
|
883
|
+ <template v-if="isMultiChart || selectedChartType.indexOf('radar') !==-1 || selectedChartType == 'graph.simple'">
|
|
|
884
|
+ <div class="datastyle">
|
|
|
885
|
+ <span>系列属性:</span>
|
|
|
886
|
+ <i-select class="fourInputWidth" v-model="dataSettings.series">
|
|
|
887
|
+ <i-option v-for="item in sqlDataFieldList" :value="item.title">{{ item.title }}</i-option>
|
|
|
888
|
+ </i-select>
|
|
|
889
|
+ </div>
|
|
|
890
|
+ </template>
|
|
|
891
|
+ <!--分割线-->
|
|
|
892
|
+ <template v-if="selectedChartType == 'graph.simple'">
|
|
|
893
|
+ <Divider style="margin: 20px 0 20px 0"></Divider>
|
|
|
894
|
+ <div class="datastyle">
|
|
|
895
|
+ <span>绑定节点关系数据集:</span>
|
|
|
896
|
+ <i-select style="width: 48%" v-model="dataSettings.dataId1" @on-change="onSelectSqlData2">
|
|
|
897
|
+ <i-option v-for="item in sqlDataList" :value="item.dbId">{{ item.title }}</i-option>
|
|
|
898
|
+ </i-select>
|
|
|
899
|
+ </div>
|
|
|
900
|
+ <div class="datastyle">
|
|
|
901
|
+ <span>来源属性:</span>
|
|
|
902
|
+ <i-select class="fourInputWidth" v-model="dataSettings.source">
|
|
|
903
|
+ <i-option v-for="item in sqlDataFieldList2" :value="item.title">{{ item.title }}</i-option>
|
|
|
904
|
+ </i-select>
|
|
|
905
|
+ </div>
|
|
|
906
|
+ <div class="datastyle">
|
|
|
907
|
+ <span>目标属性:</span>
|
|
|
908
|
+ <i-select class="fourInputWidth" :model.sync="dataSettings.target" v-model="dataSettings.target">
|
|
|
909
|
+ <i-option v-for="item in sqlDataFieldList2" :value="item.title">{{ item.title }}</i-option>
|
|
|
910
|
+ </i-select>
|
|
|
911
|
+ </div>
|
|
|
912
|
+ </template>
|
|
|
913
|
+ </div>
|
|
|
914
|
+
|
|
|
915
|
+ <!-- json数据集 -->
|
|
|
916
|
+ <div class="datastyle rightFontSize dataSourceForm" v-if="dataSettings.dataType == 'json'">
|
|
|
917
|
+ <div>
|
|
|
918
|
+ <span>绑定数据集:</span>
|
|
|
919
|
+ <i-select style="width: 136px" v-model="dataSettings.dataId" @on-change="onSelectJsonData">
|
|
|
920
|
+ <i-option class="rightFontSize" v-for="item in jsonDataList" :value="item.dbId">{{ item.title }}</i-option>
|
|
|
921
|
+ </i-select>
|
|
|
922
|
+ </div>
|
|
|
923
|
+ </div>
|
|
|
924
|
+
|
|
|
925
|
+ <!-- javaBean数据集 -->
|
|
|
926
|
+ <div class="datastyle rightFontSize dataSourceForm" v-if="dataSettings.dataType == 'javabean'">
|
|
|
927
|
+ <div>
|
|
|
928
|
+ <span>绑定数据集:</span>
|
|
|
929
|
+ <i-select style="width: 136px" v-model="dataSettings.dataId" @on-change="onSelectJavaBeanData">
|
|
|
930
|
+ <i-option class="rightFontSize" v-for="item in javaBeanDataList" :value="item.dbId">{{ item.title }}</i-option>
|
|
|
931
|
+ </i-select>
|
|
|
932
|
+ </div>
|
|
|
933
|
+ </div>
|
|
|
934
|
+ <!-- 多维度处理 -->
|
|
|
935
|
+ <div class="datastyle" v-if="(dataSettings.dataType == 'sql' || dataSettings.apiStatus == '1' || dataSettings.apiStatus == '0') && (selectedChartType == 'mixed.linebar'||selectedChartType == 'bar.stack')|| selectedChartId=='bar.negative'">
|
|
|
936
|
+ <p>系列类型:</p>
|
|
|
937
|
+ <div style="margin-top: 5px;">
|
|
|
938
|
+ <Row class="ivurow" style="margin-top: 5px;">
|
|
|
939
|
+ <i-button type="primary" size="small" @click="seriesModal=true">新增</i-button>
|
|
|
940
|
+ </Row>
|
|
|
941
|
+ <i-table stripe :columns="seriesColumns" :data="seriesTypeData"></i-table>
|
|
|
942
|
+ </div>
|
|
|
943
|
+ </div>
|
|
|
944
|
+ <!-- 刷新配置 -->
|
|
|
945
|
+ <template class="rightFontSize" v-if="dataSettings.apiStatus==='1' || dataSettings.dataType == 'sql'">
|
|
|
946
|
+ <div class="datastyle">
|
|
|
947
|
+ <span style="display: inline-block;text-align: left;width: calc(100% - 50px);" class="rightFontSize">定时刷新:</span>
|
|
|
948
|
+ <i-switch size="small" v-model="dataSettings.isTiming" @on-change="timerChange"/>
|
|
|
949
|
+ </div>
|
|
|
950
|
+ <div class="datastyle" style="display: flex;align-items: center;" v-if="dataSettings.isTiming">
|
|
|
951
|
+ <span style="display: inline-block;text-align: left;width: calc(100% - 100px);">刷新间隔:</span>
|
|
|
952
|
+ <i-input size="small" type="number" v-model="dataSettings.intervalTime" style="width:100px" @on-blur="timerChange"><span slot="append">秒</span></i-input>
|
|
|
953
|
+ </div>
|
|
|
954
|
+ </template>
|
|
|
955
|
+ <i-button @click="runChart" type="primary" style="width: 100%;height: 36px;margin-top: 10%;">运行</i-button>
|
|
|
956
|
+ </tab-pane>
|
|
|
957
|
+
|
|
|
958
|
+ <!-- 背景图设置 -->
|
|
|
959
|
+ <tab-pane v-if="backgroundSettingShow" style="visibility: visible" label="背景图设置" name="name4" :class="'little-input'" class="rightFontSize dataSourceForm">
|
|
|
960
|
+ <div :class="backgroundSettings.path?'excel-backgroud-st':''" style="height: 500px;overflow-y: auto;padding:14px 7px;">
|
|
|
961
|
+ <span style="display:inline-block;margin: 5px 0">图片:</span>
|
|
|
962
|
+ <Upload
|
|
|
963
|
+ ref="upload"
|
|
|
964
|
+ :headers = "uploadHeaders"
|
|
|
965
|
+ :show-upload-list="false"
|
|
|
966
|
+ :default-file-list="backgroundImg"
|
|
|
967
|
+ :on-success="backgroundImgUploadSuccess"
|
|
|
968
|
+ :on-exceeded-size="(e)=>handleMaxSize(e,10)"
|
|
|
969
|
+ :format="['jpg','jpeg','png']"
|
|
|
970
|
+ :max-size="10240"
|
|
|
971
|
+ :action=" actionUrlPre + '/jmreport/upload' "
|
|
|
972
|
+ style="display: inline-block;width:58px;">
|
|
|
973
|
+ <div style="display: block" class="pictorial-icon-upload" v-if="backgroundSettings.path">
|
|
|
974
|
+ <img style="width: 196px;max-height: 100px" :src="getBackgroundImg()"/>
|
|
|
975
|
+ <div class="cover" style="width: 196px">
|
|
|
976
|
+ <Icon type="ios-create-outline"/>
|
|
|
977
|
+ </div>
|
|
|
978
|
+ </div>
|
|
|
979
|
+ <i-button v-else style="margin-left:25px" type="primary" size="small">上传</i-button>
|
|
|
980
|
+ </Upload>
|
|
|
981
|
+
|
|
|
982
|
+ <div style="width:100%">
|
|
|
983
|
+ <div class="basicSettingTop">
|
|
|
984
|
+ <span style="padding: 6px 0">图片宽度:</span>
|
|
|
985
|
+ <i-input class="fourInputWidth" v-model="backgroundSettings.width" @on-blur="backgroundChange"></i-input>
|
|
|
986
|
+ </div>
|
|
|
987
|
+ <div class="basicSettingTop">
|
|
|
988
|
+ <span style="padding: 6px 0">图片高度:</span>
|
|
|
989
|
+ <i-input class="fourInputWidth" v-model="backgroundSettings.height" @on-blur="backgroundChange"></i-input>
|
|
|
990
|
+ </div>
|
|
|
991
|
+ </div>
|
|
|
992
|
+
|
|
|
993
|
+ <div style="width:100%;" class="basicSettingTop">
|
|
|
994
|
+ <span style="padding: 6px 0">重复设置:</span>
|
|
|
995
|
+ <i-select class="fourInputWidth" v-model="backgroundSettings.repeat" style="width:99%" @on-change="backgroundChange">
|
|
|
996
|
+ <i-option class="rightFontSize" value="no-repeat">无重复</i-option>
|
|
|
997
|
+ <i-option class="rightFontSize" value="repeat-x">水平重复</i-option>
|
|
|
998
|
+ <i-option class="rightFontSize" value="repeat-y">垂直重复</i-option>
|
|
|
999
|
+ <i-option class="rightFontSize" value="repeat">双向重复</i-option>
|
|
|
1000
|
+ </i-select>
|
|
|
1001
|
+ </div>
|
|
|
1002
|
+
|
|
|
1003
|
+ <i-button v-if="backgroundSettings.path" style="width: 99%;margin:10px 0" type="primary" @click="removeBackground">取消背景图</i-button>
|
|
|
1004
|
+
|
|
|
1005
|
+ <div style="width:100%;" class="basicSettingTop">
|
|
|
1006
|
+ <span style="padding: 6px 0">表格边框:</span>
|
|
|
1007
|
+ <i-select class="fourInputWidth" v-model="gridLine" style="width:99%" @on-change="gridLineChange">
|
|
|
1008
|
+ <i-option class="rightFontSize" value="true">显示</i-option>
|
|
|
1009
|
+ <i-option class="rightFontSize" value="false">隐藏</i-option>
|
|
|
1010
|
+ </i-select>
|
|
|
1011
|
+ </div>
|
|
|
1012
|
+
|
|
|
1013
|
+ </div>
|
|
|
1014
|
+ </tab-pane>
|
|
|
1015
|
+
|
|
|
1016
|
+ <!-- 条形码设置 -->
|
|
|
1017
|
+ <tab-pane v-if="barcodeSettings" style="visibility: visible" :label="qrCodeLabel" name="name5" :class="'little-input'">
|
|
|
1018
|
+ <j-barcode-setting @change="onBarcodeChange" :settings="barcodeSettings"></j-barcode-setting>
|
|
|
1019
|
+ </tab-pane>
|
|
|
1020
|
+
|
|
|
1021
|
+ <!-- 二维码设置 -->
|
|
|
1022
|
+ <tab-pane v-if="qrcodeSettings" style="visibility: visible" :label="codeLabel" name="name6" :class="'little-input'">
|
|
|
1023
|
+ <j-qrcode-setting @change="onBarcodeChange" :settings="qrcodeSettings"></j-qrcode-setting>
|
|
|
1024
|
+ </tab-pane>
|
|
|
1025
|
+ </Tabs>
|
|
|
1026
|
+
|
|
|
1027
|
+ </card>
|
|
|
1028
|
+ </div>
|
|
|
1029
|
+ </div>
|
|
|
1030
|
+ </div>
|
|
|
1031
|
+ <!-- 打印配置弹框 -->
|
|
|
1032
|
+ <j-print-setting :show="printSettingShow" :settings="printSettings" :config="configString" @change="onPrintSettingChange"></j-print-setting>
|
|
|
1033
|
+
|
|
|
1034
|
+ <j-view-setting :show="viewSettingShow" :settings="viewSettings" @change="onViewSettingChange"></j-view-setting>
|
|
|
1035
|
+</div>
|
|
|
1036
|
+
|
|
|
1037
|
+<script>
|
|
|
1038
|
+
|
|
|
1039
|
+ var excel_config_id = "${config_id}";
|
|
|
1040
|
+ var excel_req_token = '';
|
|
|
1041
|
+ var xs = null;
|
|
|
1042
|
+ var vm = null;
|
|
|
1043
|
+ let autoSaveFun;
|
|
|
1044
|
+
|
|
|
1045
|
+ /**
|
|
|
1046
|
+ * 获取后台配置的报表配置
|
|
|
1047
|
+ */
|
|
|
1048
|
+ function getReportConfigJson() {
|
|
|
1049
|
+ let str = '${reportConfig}';
|
|
|
1050
|
+ return JSON.parse(str)
|
|
|
1051
|
+ }
|
|
|
1052
|
+
|
|
|
1053
|
+ function load() {
|
|
|
1054
|
+ let token = window.localStorage.getItem('JmReport-Access-Token');
|
|
|
1055
|
+ if (token == "" || token == null){
|
|
|
1056
|
+ token = getRequestUrl().token;
|
|
|
1057
|
+ }
|
|
|
1058
|
+ excel_req_token = token
|
|
|
1059
|
+ console.log("index_load--------------",token);
|
|
|
1060
|
+ let reportConfig = getReportConfigJson();
|
|
|
1061
|
+ let colLength = 50, viewPageSize = [10,20,30], printPaper = []
|
|
|
1062
|
+ if(reportConfig['pageSize']){
|
|
|
1063
|
+ viewPageSize = reportConfig['pageSize']
|
|
|
1064
|
+ }
|
|
|
1065
|
+ if(reportConfig['col']){
|
|
|
1066
|
+ colLength = reportConfig['col']
|
|
|
1067
|
+ }
|
|
|
1068
|
+ if(reportConfig['printPaper']){
|
|
|
1069
|
+ printPaper = reportConfig['printPaper']
|
|
|
1070
|
+ }
|
|
|
1071
|
+ let showGridLine = true;
|
|
|
1072
|
+ if(reportConfig['line']==false){
|
|
|
1073
|
+ showGridLine = false;
|
|
|
1074
|
+ }
|
|
|
1075
|
+ const options = {
|
|
|
1076
|
+ "domain": 'http://localhost:8080/jeecg-boot',
|
|
|
1077
|
+ "viewLocalImage":"/jmreport/img",//预览本地图片方法
|
|
|
1078
|
+ "uploadUrl":"/jmreport/upload", //统一上传地址
|
|
|
1079
|
+ "uploadExcelUrl":"/jmreport/importExcel?token="+token,//上传excel方法
|
|
|
1080
|
+ pageSize: viewPageSize, //分页条数
|
|
|
1081
|
+ printPaper: printPaper,
|
|
|
1082
|
+ domain:window.location.origin+base,
|
|
|
1083
|
+ showToolbar: true, //头部操作按钮
|
|
|
1084
|
+ showGrid: showGridLine, //excel表格
|
|
|
1085
|
+ showContextmenu: true, //右键操作按钮
|
|
|
1086
|
+ view: {
|
|
|
1087
|
+ height: () => document.documentElement.clientHeight,
|
|
|
1088
|
+ width: () => document.documentElement.clientWidth,
|
|
|
1089
|
+ },
|
|
|
1090
|
+ row: {
|
|
|
1091
|
+ len: 100,
|
|
|
1092
|
+ height: 25,
|
|
|
1093
|
+ minRowResizerHeight:1 //拖拽行最小高度
|
|
|
1094
|
+ },
|
|
|
1095
|
+ col: {
|
|
|
1096
|
+ len: colLength,
|
|
|
1097
|
+ width: 100,
|
|
|
1098
|
+ minWidth: 60,
|
|
|
1099
|
+ height: 0,
|
|
|
1100
|
+ minColResizerHeight:1//拖拽列最小高度
|
|
|
1101
|
+ },
|
|
|
1102
|
+ style: {
|
|
|
1103
|
+ bgcolor: '#ffffff',
|
|
|
1104
|
+ align: 'left',
|
|
|
1105
|
+ valign: 'middle',
|
|
|
1106
|
+ textwrap: false,
|
|
|
1107
|
+ strike: false,
|
|
|
1108
|
+ underline: false,
|
|
|
1109
|
+ color: '#0a0a0a',
|
|
|
1110
|
+ font: {
|
|
|
1111
|
+ name: 'Microsoft YaHei',
|
|
|
1112
|
+ size: 10,
|
|
|
1113
|
+ bold: false,
|
|
|
1114
|
+ italic: false,
|
|
|
1115
|
+ },
|
|
|
1116
|
+ },
|
|
|
1117
|
+ };
|
|
|
1118
|
+
|
|
|
1119
|
+ x.spreadsheet.locale('zh-cn');
|
|
|
1120
|
+ xs = x.spreadsheet('#jm-sheet-wrapper', options)
|
|
|
1121
|
+ .onSave(function (data) {
|
|
|
1122
|
+ //设置报表打印宽度
|
|
|
1123
|
+ const dataRect = xs.data.getDataRect();
|
|
|
1124
|
+ let dataRectWidth = 0;
|
|
|
1125
|
+ if(dataRect){
|
|
|
1126
|
+ dataRectWidth = dataRect.w;
|
|
|
1127
|
+ }
|
|
|
1128
|
+ //直接读取文本框的值
|
|
|
1129
|
+ // const printElWidth = xs.sheet.toolbar.toolPrintInputEl.input.el.value
|
|
|
1130
|
+ data['dataRectWidth'] = dataRectWidth;
|
|
|
1131
|
+ data['excel_config_id'] = excel_config_id;
|
|
|
1132
|
+ // data['printElWidth'] = Number(printElWidth) || dataRectWidth;
|
|
|
1133
|
+ // data['printElHeight'] = Number(xs.sheet.toolbar.toolPrintHeightInputEl.input.el.value)
|
|
|
1134
|
+ data['toolPrintSizeObj'] = xs.data.toolPrintSizeObj;
|
|
|
1135
|
+
|
|
|
1136
|
+ $jm.excelSave(data, token,function (res) {
|
|
|
1137
|
+ xs.tip("保存成功!");
|
|
|
1138
|
+ let refresh = res.isRefresh;
|
|
|
1139
|
+ if(refresh && refresh==true){
|
|
|
1140
|
+ window.location.reload()
|
|
|
1141
|
+ }
|
|
|
1142
|
+ });
|
|
|
1143
|
+ })
|
|
|
1144
|
+ .onAddChart(function(a){
|
|
|
1145
|
+ vm.addChartModule();
|
|
|
1146
|
+ })
|
|
|
1147
|
+ .onSelectChart(function(data){
|
|
|
1148
|
+ vm.clearRightTabpane();
|
|
|
1149
|
+ setTimeout(()=>{
|
|
|
1150
|
+ vm.selectChart(data);
|
|
|
1151
|
+ },200)
|
|
|
1152
|
+ })
|
|
|
1153
|
+ .onChartDelete(function(){
|
|
|
1154
|
+ vm.chartsflag=false;
|
|
|
1155
|
+ vm.rightTabName='name1';
|
|
|
1156
|
+ })
|
|
|
1157
|
+ .onSettingEvent(function (e, param) {
|
|
|
1158
|
+ if(e==='background'){
|
|
|
1159
|
+ vm.handleBackground(param)
|
|
|
1160
|
+ }else if(e==='clickcell'){
|
|
|
1161
|
+ vm.onClickCell(param)
|
|
|
1162
|
+ //是否在弹窗情况下
|
|
|
1163
|
+ //TODO 先注释掉获取单元格的方法
|
|
|
1164
|
+ // if(vm.commonFunction){
|
|
|
1165
|
+ // let ci = param.ci;
|
|
|
1166
|
+ // let ri = param.ri+1;
|
|
|
1167
|
+ // //对列转换成英文字母
|
|
|
1168
|
+ // let excelStr = vm.excelColIndexToStr(ci);
|
|
|
1169
|
+ // //是否选中函数
|
|
|
1170
|
+ // if(vm.interpretation){
|
|
|
1171
|
+ // vm.functionText = excelStr+ri
|
|
|
1172
|
+ // vm.expression = "="+vm.interpretation+"("+excelStr+ri+")"
|
|
|
1173
|
+ // }
|
|
|
1174
|
+ // }
|
|
|
1175
|
+ if( vm.excel.direction=='right'){
|
|
|
1176
|
+ vm.wayDisabled = true;
|
|
|
1177
|
+ }else{
|
|
|
1178
|
+ vm.wayDisabled = false;
|
|
|
1179
|
+ }
|
|
|
1180
|
+ }else if(e==='print-setting'){
|
|
|
1181
|
+ vm.onPrintSetting(param)
|
|
|
1182
|
+ }else if(e==='view-setting'){
|
|
|
1183
|
+ vm.onViewSetting(param)
|
|
|
1184
|
+ }else if(e==='export-config'){
|
|
|
1185
|
+ vm.exportReportConfig()
|
|
|
1186
|
+ }
|
|
|
1187
|
+ })
|
|
|
1188
|
+ // 自定义校验
|
|
|
1189
|
+ .onValidate(function (type, cell) {
|
|
|
1190
|
+ if(type === 'editor'){
|
|
|
1191
|
+ //此事件 cell对象只回传了这三个属性值
|
|
|
1192
|
+ let { flag, text } = vm.validateDbExpression(cell.text)
|
|
|
1193
|
+ xs.updateEditor({error: !flag, text: text})
|
|
|
1194
|
+ }
|
|
|
1195
|
+ })
|
|
|
1196
|
+ .onUploadExcel(function (res) {
|
|
|
1197
|
+ if(!res.success) return;
|
|
|
1198
|
+ const xsData ={...xs.getData()};
|
|
|
1199
|
+ let a = res.result
|
|
|
1200
|
+ Object.keys(a).map(k=>{
|
|
|
1201
|
+ xsData[k] = a[k]
|
|
|
1202
|
+ })
|
|
|
1203
|
+ xs.loadData(xsData);
|
|
|
1204
|
+ })
|
|
|
1205
|
+ .onCellExpress(function (res) {
|
|
|
1206
|
+ vm.customExpressionShow=true
|
|
|
1207
|
+ //记录坐标
|
|
|
1208
|
+ if(res){
|
|
|
1209
|
+ vm.expression=res
|
|
|
1210
|
+ //判断是哪个函数,循环list
|
|
|
1211
|
+ let functionList = vm.functionList;
|
|
|
1212
|
+ let left = 0;
|
|
|
1213
|
+ let right = 0;
|
|
|
1214
|
+ let text ="";
|
|
|
1215
|
+ for (let i = 0; i <functionList.length; i++) {
|
|
|
1216
|
+ let functionElement = functionList[i]['name'].split(",");
|
|
|
1217
|
+ for (let j = 0; j <functionElement.length; j++) {
|
|
|
1218
|
+ if(text && text.indexOf(functionElement[j])>0){
|
|
|
1219
|
+ text = functionElement[j];
|
|
|
1220
|
+ left = i;
|
|
|
1221
|
+ right = j;
|
|
|
1222
|
+ }else{
|
|
|
1223
|
+ if(vm.expression.indexOf(functionElement[j])>0){
|
|
|
1224
|
+ text = functionElement[j];
|
|
|
1225
|
+ left = i;
|
|
|
1226
|
+ right = j;
|
|
|
1227
|
+ }
|
|
|
1228
|
+ }
|
|
|
1229
|
+ }
|
|
|
1230
|
+ }
|
|
|
1231
|
+ vm.commonFunction=true
|
|
|
1232
|
+ vm.newFunctionList= vm.functionList[left].name.split(",")
|
|
|
1233
|
+ vm.leftFunctionIndex=left
|
|
|
1234
|
+ vm.rightFunctionIndex=right
|
|
|
1235
|
+ vm.interpretation= text;
|
|
|
1236
|
+ return;
|
|
|
1237
|
+ }
|
|
|
1238
|
+ vm.commonFunction=true
|
|
|
1239
|
+ vm.newFunctionList= vm.functionList[0].name.split(",")
|
|
|
1240
|
+ vm.leftFunctionIndex=0
|
|
|
1241
|
+ vm.rightFunctionIndex=0
|
|
|
1242
|
+ vm.interpretation= "sum"
|
|
|
1243
|
+ })
|
|
|
1244
|
+
|
|
|
1245
|
+ $jm.excelGet(excel_config_id,(res)=> {
|
|
|
1246
|
+ //加入预览地址
|
|
|
1247
|
+ xs.data.settings.viewUrl = window.location.origin+api.view+excel_config_id+'?token='+excel_req_token;
|
|
|
1248
|
+ var str = res.jsonStr;
|
|
|
1249
|
+ if(!str) return;
|
|
|
1250
|
+ //页面加载时设置报表宽度
|
|
|
1251
|
+ const jsonStr = JSON.parse(str);
|
|
|
1252
|
+ console.log('jsonstr', jsonStr)
|
|
|
1253
|
+ // 设置增强
|
|
|
1254
|
+ vm.setEnhanceConfig(res.cssStr, res.jsStr)
|
|
|
1255
|
+ if(jsonStr.chartList)
|
|
|
1256
|
+ {
|
|
|
1257
|
+ jsonStr.chartList.forEach(function(item){
|
|
|
1258
|
+ let config = JSON.parse(item.config);
|
|
|
1259
|
+ if (config.geo){
|
|
|
1260
|
+ if (loadMap){
|
|
|
1261
|
+ loadMap && loadMap(item)
|
|
|
1262
|
+ }
|
|
|
1263
|
+ }
|
|
|
1264
|
+ })
|
|
|
1265
|
+ }
|
|
|
1266
|
+ xs.data.settings.printElWidth = jsonStr.printElWidth || 0;
|
|
|
1267
|
+ xs.data.printElHeight = jsonStr.printElHeight || 1047; //默认a4纸大小
|
|
|
1268
|
+ // xs.sheet.toolbar.toolPrintHeightInputEl.input.el.value = xs.data.printElHeight;
|
|
|
1269
|
+ xs.loadData(jsonStr);
|
|
|
1270
|
+ if(jsonStr.settings){
|
|
|
1271
|
+ if(jsonStr.settings.showGrid == false){
|
|
|
1272
|
+ vm.gridLine = "false"
|
|
|
1273
|
+ }
|
|
|
1274
|
+ }
|
|
|
1275
|
+ setTimeout(function(){
|
|
|
1276
|
+ if (xs.data.chartList && xs.data.chartList.length > 0){
|
|
|
1277
|
+ //vm.tabPaneShow();
|
|
|
1278
|
+ vm.refreshAllChart(xs.data.chartList);
|
|
|
1279
|
+ }
|
|
|
1280
|
+ },300)
|
|
|
1281
|
+ //启动自动保存
|
|
|
1282
|
+ startAutoSave(token, excel_config_id);
|
|
|
1283
|
+ },(res)=>{
|
|
|
1284
|
+ xs.tip(res.message);
|
|
|
1285
|
+ });
|
|
|
1286
|
+ /*xs.sheet.toolbar.toolPrintInputEl.input.el.onchange=(e=>{
|
|
|
1287
|
+ var clientWidth = document.documentElement.clientWidth;
|
|
|
1288
|
+ var remainingWidth = clientWidth - e.target.value - 330;
|
|
|
1289
|
+ if (remainingWidth<300){
|
|
|
1290
|
+ xs.sheet.horizontalScrollbar.el.el.style.overflowX="scroll";
|
|
|
1291
|
+ }else {
|
|
|
1292
|
+ xs.sheet.horizontalScrollbar.el.el.style.overflowX="hidden";
|
|
|
1293
|
+ }
|
|
|
1294
|
+ })*/
|
|
|
1295
|
+ }
|
|
|
1296
|
+
|
|
|
1297
|
+</script>
|
|
|
1298
|
+<script type="text/javascript" src="${base}${customPrePath}/jmreport/desreport_/js/util.js?${CACHE_VERSION}"></script>
|
|
|
1299
|
+<script type="text/javascript" src="${base}${customPrePath}/jmreport/desreport_/js/biz/design.js?${CACHE_VERSION}"></script>
|
|
|
1300
|
+<script>
|
|
|
1301
|
+ window.onbeforeunload = function(event){
|
|
|
1302
|
+ return '您可能有数据没有保存';
|
|
|
1303
|
+ };
|
|
|
1304
|
+</script>
|
|
|
1305
|
+<#include "./common/tj.ftl">
|
|
|
1306
|
+</html> |