zek 19.0.6 → 19.0.7
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/fesm2022/zek.mjs +4 -5
- package/fesm2022/zek.mjs.map +1 -1
- package/package.json +1 -1
package/fesm2022/zek.mjs
CHANGED
|
@@ -175,15 +175,11 @@ class ArrayHelper {
|
|
|
175
175
|
const keys = Object.keys(value);
|
|
176
176
|
const slice = keys.length / 2;
|
|
177
177
|
const result = [];
|
|
178
|
-
// for (let i = 0; i < slice; i++) {
|
|
179
|
-
// result.push({ key: +keys[i], value: keys[i + slice] } as T);
|
|
180
|
-
// }
|
|
181
178
|
for (let i = slice; i < keys.length; i++) {
|
|
182
179
|
const name = keys[i];
|
|
183
180
|
result.push({ key: +value[name], value: name });
|
|
184
181
|
}
|
|
185
182
|
return result;
|
|
186
|
-
//return Array.from(keys.slice(keys.length / 2), x => { key:x, value:'aaa' } as Object);
|
|
187
183
|
}
|
|
188
184
|
static enumToKeyPairArray(value) {
|
|
189
185
|
return this.enumToKeyPairBaseArray(value);
|
|
@@ -1839,6 +1835,9 @@ class CrudService extends BaseService {
|
|
|
1839
1835
|
return this.api.post(`api/${this.controller}/batch`, model).pipe(catchError(this.handleError(this.batch.name, null)));
|
|
1840
1836
|
}
|
|
1841
1837
|
export(model, fileTypeId) {
|
|
1838
|
+
if (Convert.isNumber(model)) {
|
|
1839
|
+
return this.api.getBlob(`api/${this.controller}/${model}/export/${fileTypeId}`).pipe(catchError(this.handleError('export', null)));
|
|
1840
|
+
}
|
|
1842
1841
|
return this.api.getBlob(`api/${this.controller}/export/${fileTypeId}`, model).pipe(catchError(this.handleError('export', null)));
|
|
1843
1842
|
}
|
|
1844
1843
|
}
|
|
@@ -2744,7 +2743,7 @@ class EditBaseComponent extends EditFormComponent {
|
|
|
2744
2743
|
}
|
|
2745
2744
|
}
|
|
2746
2745
|
export(fileTypeId) {
|
|
2747
|
-
this.service.export(
|
|
2746
|
+
this.service.export(this.id, fileTypeId).subscribe(data => {
|
|
2748
2747
|
this.downloadFile(data, 'export.xlsx', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
|
|
2749
2748
|
});
|
|
2750
2749
|
}
|