tnx-shared 5.1.499 → 5.1.500
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/bundles/tnx-shared.umd.js +59 -22
- package/bundles/tnx-shared.umd.js.map +1 -1
- package/bundles/tnx-shared.umd.min.js +1 -1
- package/bundles/tnx-shared.umd.min.js.map +1 -1
- package/classes/base/list-component-base.d.ts +2 -2
- package/classes/base/list-component-base.d.ts.map +1 -1
- package/classes/form-schema.d.ts +1 -0
- package/classes/form-schema.d.ts.map +1 -1
- package/esm2015/classes/base/list-component-base.js +39 -23
- package/esm2015/classes/form-schema.js +2 -1
- package/fesm2015/tnx-shared.js +39 -22
- package/fesm2015/tnx-shared.js.map +1 -1
- package/package.json +2 -2
- package/tnx-shared.metadata.json +1 -1
|
@@ -929,6 +929,7 @@
|
|
|
929
929
|
this.checkPermisionTrinhKy = false;
|
|
930
930
|
this.useWorkflowButton = false;
|
|
931
931
|
this.showEditLink = true;
|
|
932
|
+
this.showConfirmExport = false;
|
|
932
933
|
this.showEditLinkOnlyView = false;
|
|
933
934
|
this.mdWidthCommonSearch = 3;
|
|
934
935
|
this.useCommonSearch = false;
|
|
@@ -22414,30 +22415,66 @@
|
|
|
22414
22415
|
this.onAdd.emit();
|
|
22415
22416
|
};
|
|
22416
22417
|
ListComponentBase.prototype.xuatCacMucDaChon = function () {
|
|
22417
|
-
|
|
22418
|
-
|
|
22419
|
-
|
|
22420
|
-
|
|
22421
|
-
|
|
22422
|
-
|
|
22423
|
-
|
|
22424
|
-
|
|
22425
|
-
|
|
22426
|
-
|
|
22418
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
22419
|
+
var rs;
|
|
22420
|
+
return __generator(this, function (_b) {
|
|
22421
|
+
switch (_b.label) {
|
|
22422
|
+
case 0:
|
|
22423
|
+
if (!this.setting.showConfirmExport) return [3 /*break*/, 2];
|
|
22424
|
+
return [4 /*yield*/, this._notifierService.showConfirm('Bạn có chắc chắn muốn xuất bản ghi đã chọn (Và các bản ghi con tương ứng)', 'Xác nhận xuất file')];
|
|
22425
|
+
case 1:
|
|
22426
|
+
rs = _b.sent();
|
|
22427
|
+
if (!rs) {
|
|
22428
|
+
return [2 /*return*/];
|
|
22429
|
+
}
|
|
22430
|
+
_b.label = 2;
|
|
22431
|
+
case 2:
|
|
22432
|
+
switch (this.setting.exportItemsMode) {
|
|
22433
|
+
case exports.ExportItemsMode.FromHtml:
|
|
22434
|
+
this.exportByReadingHtml();
|
|
22435
|
+
break;
|
|
22436
|
+
case exports.ExportItemsMode.ManualGetData:
|
|
22437
|
+
case exports.ExportItemsMode.AutoGetData:
|
|
22438
|
+
default:
|
|
22439
|
+
this._notifierService.showWarning('The function haven\'t supported yet');
|
|
22440
|
+
break;
|
|
22441
|
+
}
|
|
22442
|
+
return [2 /*return*/];
|
|
22443
|
+
}
|
|
22444
|
+
});
|
|
22445
|
+
});
|
|
22427
22446
|
};
|
|
22428
22447
|
ListComponentBase.prototype.printByReadingHtml = function () {
|
|
22429
|
-
|
|
22430
|
-
|
|
22431
|
-
|
|
22432
|
-
|
|
22433
|
-
|
|
22434
|
-
|
|
22435
|
-
|
|
22436
|
-
|
|
22437
|
-
|
|
22438
|
-
|
|
22439
|
-
|
|
22440
|
-
|
|
22448
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
22449
|
+
var rs, header, element, tableEle, headEle, bodyEle, arrHeadEle, arrRowData, strHeadEle, strBodyEle, css, table;
|
|
22450
|
+
return __generator(this, function (_b) {
|
|
22451
|
+
switch (_b.label) {
|
|
22452
|
+
case 0:
|
|
22453
|
+
if (!this.setting.showConfirmExport) return [3 /*break*/, 2];
|
|
22454
|
+
return [4 /*yield*/, this._notifierService.showConfirm('Bạn có chắc chắn muốn in bản ghi đã chọn (Và các bản ghi con tương ứng)', 'Xác nhận in file')];
|
|
22455
|
+
case 1:
|
|
22456
|
+
rs = _b.sent();
|
|
22457
|
+
if (!rs) {
|
|
22458
|
+
return [2 /*return*/];
|
|
22459
|
+
}
|
|
22460
|
+
_b.label = 2;
|
|
22461
|
+
case 2:
|
|
22462
|
+
header = 'Danh sách ' + this.setting.objectName;
|
|
22463
|
+
element = this.table.el.nativeElement;
|
|
22464
|
+
tableEle = element.querySelector('table');
|
|
22465
|
+
headEle = tableEle.querySelector('thead');
|
|
22466
|
+
bodyEle = tableEle.querySelector('tbody');
|
|
22467
|
+
arrHeadEle = this.getArrHeadByHtml(headEle);
|
|
22468
|
+
arrRowData = this.getArrRowDataByHtml(bodyEle, arrHeadEle);
|
|
22469
|
+
strHeadEle = this.headHtmlToString(arrHeadEle);
|
|
22470
|
+
strBodyEle = this.rowDataHtmlToString(arrRowData);
|
|
22471
|
+
css = '<style type="text/css">table th, table td {border:1px solid #000;} table th {text-align: center;} table {width: 100%;border-collapse: collapse;} table td:first-child {text-align: center;}</style>';
|
|
22472
|
+
table = css + "<table>" + strHeadEle + strBodyEle + "</table>";
|
|
22473
|
+
this._printService.printHtmlContent(table, header.toUpperCase());
|
|
22474
|
+
return [2 /*return*/];
|
|
22475
|
+
}
|
|
22476
|
+
});
|
|
22477
|
+
});
|
|
22441
22478
|
};
|
|
22442
22479
|
ListComponentBase.prototype.printByReadingHtmlHasRowSpan = function () {
|
|
22443
22480
|
var header = 'Danh sách ' + this.setting.objectName;
|