ru.coon 2.6.18 → 2.6.19
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/CHANGELOG.md +9 -0
- package/package.json +2 -2
- package/src/nav/MenuLoader.js +23 -0
- package/src/report/component/reportpanel/ReportGrid.js +5 -1
- package/src/report/plugin/configPanel/ExportReportDataToFilePluginConfigPanel.js +33 -12
- package/src/report/plugin/grid/ExportReportDataToFilePlugin.js +26 -20
- package/src/report/plugin/grid/ExportReportDataToFilePlugin.md +7 -0
- package/src/version.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
# Version 2.6.19, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f0dadaf8801ac3d1f9e6cc5accc592c563b6a013)
|
|
2
|
+
* ## Features
|
|
3
|
+
* <span style='color:green'>feat: HT-8044 ExportReportDataToFilePlugin add exportConfig field</span> ([2ae4c4], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/2ae4c4b856766859796ad6f47d4a8d09e7255200))
|
|
4
|
+
* <span style='color:green'>feat: HT-8044 ExportReportDataToFilePlugin add exportConfig field</span> ([0df785], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0df785630853bcaf2291476fd7007f9a29761d63))
|
|
5
|
+
* <span style='color:green'>feat: HT-8145: remove and set table view empty text on load / before load</span> ([e14b0b], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e14b0b784256fc854be3d042bb695575eac83269))
|
|
6
|
+
|
|
7
|
+
* update extjs_iconpack ([648132], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/648132fadfa22e609d17317e40aee2e99ac289ca))
|
|
8
|
+
* update: CHANGELOG.md ([7b85e2], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/7b85e26648ab43868b4b1db32f11fb04113645dc))
|
|
9
|
+
|
|
1
10
|
# Version 2.6.18, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/1c189ec63993901ccd4a8045777a19f485c5c065)
|
|
2
11
|
* ## Fixes
|
|
3
12
|
* <span style='color:red'> windowWrap default size for restore when maximized:true CRM-8393</span> ([8eb4a5], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/8eb4a5586089b2cc8581e0d647e20b8955c8b097))
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"name": "ru.coon"
|
|
5
5
|
},
|
|
6
6
|
"description": "",
|
|
7
|
-
"version": "2.6.
|
|
7
|
+
"version": "2.6.19",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
10
|
"url": "git+http://gitlab-dbr.sigma-it.local/dbr/ru.coon"
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"ace-diff": "^3.0.3",
|
|
28
28
|
"decimal.js-light": "^2.5.1",
|
|
29
29
|
"echarts": "^5.3.3",
|
|
30
|
-
"extjs_iconpack": "1.3.
|
|
30
|
+
"extjs_iconpack": "1.3.20",
|
|
31
31
|
"json5": "2.2.3",
|
|
32
32
|
"object-hash": "^3.0.0",
|
|
33
33
|
"sigma-printjs": "^1.0.1",
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Ext.define('Coon.nav.MenuLoader', {
|
|
2
|
+
singleton: true,
|
|
3
|
+
|
|
4
|
+
isLoaded: false,
|
|
5
|
+
|
|
6
|
+
load() {
|
|
7
|
+
return Coon.util.promisifyCmd('command.GetDynamicReportDataCommand', 'MENU_ALLITEMS')
|
|
8
|
+
.then((data) => {
|
|
9
|
+
if (Array.isArray(data.list)) {
|
|
10
|
+
this.uiElementMap = data.list.reduce();
|
|
11
|
+
}
|
|
12
|
+
this.isLoaded = true;
|
|
13
|
+
});
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
get() {
|
|
17
|
+
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
isValidMenuItem(uiEmentId) {
|
|
21
|
+
return this.uiElementMap.has(uiEmentId);
|
|
22
|
+
},
|
|
23
|
+
});
|
|
@@ -39,7 +39,11 @@ Ext.define('Coon.report.component.reportpanel.ReportGrid', {
|
|
|
39
39
|
|
|
40
40
|
this.on('afterrender', () => {
|
|
41
41
|
this.doAutoSizeAllColumn();
|
|
42
|
-
this.store.on('load',
|
|
42
|
+
this.store.on('load', () => {
|
|
43
|
+
this.doAutoSizeAllColumn();
|
|
44
|
+
this.getView().setEmptyText(this.initialConfig.viewConfig.emptyText);
|
|
45
|
+
}, this);
|
|
46
|
+
this.store.on('beforeload', () => this.getView().setEmptyText(''));
|
|
43
47
|
}, this, {single: true});
|
|
44
48
|
|
|
45
49
|
this.tbar = Ext.create({xtype: 'toolbar', hidden: true, enableOverflow: true, items: [].concat(this.tbar || [])});
|
|
@@ -96,18 +96,35 @@ Ext.define('Coon.report.plugin.configPanel.ExportReportDataToFilePluginConfigPan
|
|
|
96
96
|
},
|
|
97
97
|
title: 'Экспорт в',
|
|
98
98
|
flex: 1,
|
|
99
|
-
items: [
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
99
|
+
items: [
|
|
100
|
+
{
|
|
101
|
+
xtype: 'combo',
|
|
102
|
+
allowBlank: false,
|
|
103
|
+
store: [
|
|
104
|
+
{name: 'Excel', id: 'excel'},
|
|
105
|
+
{name: 'PDF', id: 'pdf'},
|
|
106
|
+
{name: 'CSV', id: 'csv'}
|
|
107
|
+
],
|
|
108
|
+
displayField: 'name',
|
|
109
|
+
valueField: 'id',
|
|
110
|
+
name: 'exportFileFormat',
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
xtype: 'container',
|
|
114
|
+
html: `<div style="font-size:12px;color:gray">
|
|
115
|
+
Конфиг. Для выгрузки в csv можно задать значение параметров:
|
|
116
|
+
<br>border - символ начала и окончания строки, по умолчанию '"' (двойные кавычки)
|
|
117
|
+
<br>separator - разделитель значений ячеек, по умолчанию ',' (запятая)
|
|
118
|
+
</div>`,
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
xtype: 'UiAceEditor',
|
|
122
|
+
useLinter: true,
|
|
123
|
+
scrollable: 'y',
|
|
124
|
+
name: 'exportConfig',
|
|
125
|
+
value: {},
|
|
126
|
+
}
|
|
127
|
+
],
|
|
111
128
|
};
|
|
112
129
|
},
|
|
113
130
|
|
|
@@ -158,6 +175,9 @@ Ext.define('Coon.report.plugin.configPanel.ExportReportDataToFilePluginConfigPan
|
|
|
158
175
|
if (config && config.columnList) {
|
|
159
176
|
this.columnList = config.columnList;
|
|
160
177
|
}
|
|
178
|
+
if (config.exportConfig) {
|
|
179
|
+
this.down('UiAceEditor').setValue(config.exportConfig);
|
|
180
|
+
}
|
|
161
181
|
this.setFieldsData(this.context.fields);
|
|
162
182
|
},
|
|
163
183
|
|
|
@@ -190,6 +210,7 @@ Ext.define('Coon.report.plugin.configPanel.ExportReportDataToFilePluginConfigPan
|
|
|
190
210
|
config['columnList'] = JSON5.stringify(checkedRecords.length ? checkedRecords : this.grid.getStore().queryRecords());
|
|
191
211
|
config['allowUserSelectColumnsToUpload'] = allowUserColumns;
|
|
192
212
|
}
|
|
213
|
+
config['exportConfig'] = this.down('UiAceEditor').getValue();
|
|
193
214
|
return config;
|
|
194
215
|
});
|
|
195
216
|
},
|
|
@@ -12,6 +12,7 @@ Ext.define('Coon.report.plugin.grid.ExportReportDataToFilePlugin', {
|
|
|
12
12
|
allowUserSelectColumnsToUpload: undefined,
|
|
13
13
|
addToSearchButton: false,
|
|
14
14
|
},
|
|
15
|
+
exportConfig: {},
|
|
15
16
|
defaultDateFormat: 'Y-m-d_h-i',
|
|
16
17
|
defaultTimeout: 10 * 60 * 1000,
|
|
17
18
|
|
|
@@ -193,23 +194,26 @@ Ext.define('Coon.report.plugin.grid.ExportReportDataToFilePlugin', {
|
|
|
193
194
|
'/ReportFormData/getExcelFromRowsOrReport' :
|
|
194
195
|
'/ReportFormData/getCSVReport';*/
|
|
195
196
|
const url = '/ReportFormData/getCSVReport';
|
|
197
|
+
const params = Ext.apply({
|
|
198
|
+
reportId: this.report.reportId,
|
|
199
|
+
fileName: this.fileName,
|
|
200
|
+
appendTimestamp: Ext.isBoolean(this.config.appendDateToFileName) ? this.config.appendDateToFileName : true,
|
|
201
|
+
parameterList: JSON.stringify(parameterList),
|
|
202
|
+
columnList: JSON.stringify(this.config.columns),
|
|
203
|
+
toExcel: JSON.stringify(this.config.toExcel),
|
|
204
|
+
separator: ';',
|
|
205
|
+
border: '',
|
|
206
|
+
}, this.exportConfig);
|
|
196
207
|
Ext.Ajax.request({
|
|
197
208
|
url,
|
|
198
209
|
method: 'POST',
|
|
199
210
|
binary: true,
|
|
200
211
|
timeout: this.getTimeout(),
|
|
201
|
-
params:
|
|
202
|
-
|
|
203
|
-
fileName: this.fileName,
|
|
204
|
-
appendTimestamp: Ext.isBoolean(this.config.appendDateToFileName) ? this.config.appendDateToFileName : true,
|
|
205
|
-
parameterList: JSON.stringify(parameterList),
|
|
206
|
-
columnList: JSON.stringify(this.config.columns),
|
|
207
|
-
toExcel: JSON.stringify(this.config.toExcel),
|
|
208
|
-
},
|
|
209
|
-
success(responce) {
|
|
212
|
+
params: params,
|
|
213
|
+
success(response) {
|
|
210
214
|
this.grid.unmask();
|
|
211
215
|
Coon.util.downloadFileFromBlob(
|
|
212
|
-
new Blob(['\uFEFF',
|
|
216
|
+
new Blob(['\uFEFF', response.responseBytes], {type: 'text/csv;charset=utf-8'}),
|
|
213
217
|
`${this.fileName}.csv`
|
|
214
218
|
);
|
|
215
219
|
},
|
|
@@ -238,22 +242,24 @@ Ext.define('Coon.report.plugin.grid.ExportReportDataToFilePlugin', {
|
|
|
238
242
|
'/ReportFormData/getExcelFromRowsOrReport' :
|
|
239
243
|
'/ReportFormData/getExcelReport';
|
|
240
244
|
|
|
245
|
+
const params = Ext.apply({
|
|
246
|
+
reportId: this.report.reportId,
|
|
247
|
+
fileName: this.fileName,
|
|
248
|
+
appendTimestamp: Ext.isBoolean(this.config.appendDateToFileName) ? this.config.appendDateToFileName : true,
|
|
249
|
+
parameterList: JSON.stringify(parameterList),
|
|
250
|
+
columnList: JSON.stringify(this.config.columns),
|
|
251
|
+
toExcel: JSON.stringify(this.config.toExcel),
|
|
252
|
+
}, this.exportConfig);
|
|
253
|
+
|
|
241
254
|
Ext.Ajax.request({
|
|
242
255
|
url,
|
|
243
256
|
method: 'POST',
|
|
244
257
|
binary: true,
|
|
245
258
|
timeout: this.getTimeout(),
|
|
246
|
-
params:
|
|
247
|
-
|
|
248
|
-
fileName: this.fileName,
|
|
249
|
-
appendTimestamp: Ext.isBoolean(this.config.appendDateToFileName) ? this.config.appendDateToFileName : true,
|
|
250
|
-
parameterList: JSON.stringify(parameterList),
|
|
251
|
-
columnList: JSON.stringify(this.config.columns),
|
|
252
|
-
toExcel: JSON.stringify(this.config.toExcel),
|
|
253
|
-
},
|
|
254
|
-
success(responce) {
|
|
259
|
+
params: params,
|
|
260
|
+
success(response) {
|
|
255
261
|
this.grid.unmask();
|
|
256
|
-
Coon.util.downloadFileFromBlob(new Blob([
|
|
262
|
+
Coon.util.downloadFileFromBlob(new Blob([response.responseBytes]), `${this.fileName}.xlsx`);
|
|
257
263
|
},
|
|
258
264
|
failure(error) {
|
|
259
265
|
this.grid.unmask();
|
package/src/version.js
CHANGED