@adins/ucsearch 2.9.12 → 2.9.13
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/README.md +3 -0
- package/esm2020/lib/ucsearch.component.mjs +32 -22
- package/fesm2015/adins-ucsearch.mjs +31 -21
- package/fesm2015/adins-ucsearch.mjs.map +1 -1
- package/fesm2020/adins-ucsearch.mjs +31 -21
- package/fesm2020/adins-ucsearch.mjs.map +1 -1
- package/lib/ucsearch.component.d.ts +2 -2
- package/package.json +1 -5
|
@@ -588,7 +588,7 @@ class UCSearchComponent {
|
|
|
588
588
|
postJSON(url, criteria = null) {
|
|
589
589
|
return this.http.post(url, criteria);
|
|
590
590
|
}
|
|
591
|
-
searchClick() {
|
|
591
|
+
searchClick(IsExportExcel = false) {
|
|
592
592
|
let filtered = this.configuration.component.filter((item, i, arr) => arr.findIndex((x) => (x.name === item.name)) === i);
|
|
593
593
|
for (let i = 0; i < filtered.length; i++) {
|
|
594
594
|
if (filtered[i].type == "numeric") {
|
|
@@ -604,7 +604,10 @@ class UCSearchComponent {
|
|
|
604
604
|
};
|
|
605
605
|
}
|
|
606
606
|
this.pageNow = 1;
|
|
607
|
-
|
|
607
|
+
let rowPerPage = this.pageSize;
|
|
608
|
+
if (IsExportExcel)
|
|
609
|
+
rowPerPage = 9999;
|
|
610
|
+
this.search(this.apiUrl, this.pageNow, rowPerPage, order, this.arrCrit, IsExportExcel);
|
|
608
611
|
}
|
|
609
612
|
reset() {
|
|
610
613
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -614,7 +617,7 @@ class UCSearchComponent {
|
|
|
614
617
|
yield this.initiateForm();
|
|
615
618
|
});
|
|
616
619
|
}
|
|
617
|
-
search(apiUrl, pageNo, rowPerPage, orderBy, addCrit = new Array()) {
|
|
620
|
+
search(apiUrl, pageNo, rowPerPage, orderBy, addCrit = new Array(), IsExportExcel = false) {
|
|
618
621
|
let request = new RequestCriteriaObj();
|
|
619
622
|
let arrCrit = new Array();
|
|
620
623
|
let IsQueryIn = false;
|
|
@@ -783,6 +786,11 @@ class UCSearchComponent {
|
|
|
783
786
|
request.integrationObj = this.searchInput.integrationObj;
|
|
784
787
|
}
|
|
785
788
|
this.http.post(apiUrl, request).subscribe((response) => {
|
|
789
|
+
if (IsExportExcel) {
|
|
790
|
+
this.ExcelData = response["Data"];
|
|
791
|
+
this.excelService.exportAsExcelFile(this.ExcelData, 'sample');
|
|
792
|
+
return;
|
|
793
|
+
}
|
|
786
794
|
let qryPaging = {
|
|
787
795
|
response: response,
|
|
788
796
|
pageNow: pageNo
|
|
@@ -850,24 +858,26 @@ class UCSearchComponent {
|
|
|
850
858
|
element.target.value = parseFloat(element.target.value.toString().replace(/,/g, ''));
|
|
851
859
|
}
|
|
852
860
|
exportAsXLSX() {
|
|
853
|
-
|
|
854
|
-
request
|
|
855
|
-
request.
|
|
856
|
-
request.
|
|
857
|
-
request.
|
|
858
|
-
request.
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
else {
|
|
863
|
-
|
|
864
|
-
}
|
|
865
|
-
this.http.post(this.apiUrl, request).subscribe(
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
861
|
+
this.searchClick(true);
|
|
862
|
+
// let request = new RequestCriteriaObj();
|
|
863
|
+
// request.pageNo = 1;
|
|
864
|
+
// request.rowPerPage = 9999;
|
|
865
|
+
// request.orderBy = null;
|
|
866
|
+
// request.criteria = [];
|
|
867
|
+
// request.queryString = this.configuration.querystring;
|
|
868
|
+
// if (!this.searchInput.isJoinExAPI) {
|
|
869
|
+
// request.integrationObj = null;
|
|
870
|
+
// } else {
|
|
871
|
+
// request.integrationObj = this.searchInput.integrationObj;
|
|
872
|
+
// }
|
|
873
|
+
// this.http.post(this.apiUrl, request).subscribe(
|
|
874
|
+
// response => {
|
|
875
|
+
// this.ExcelData = response["Data"];
|
|
876
|
+
// this.excelService.exportAsExcelFile(this.ExcelData, 'sample');
|
|
877
|
+
// },
|
|
878
|
+
// (error) => {
|
|
879
|
+
// console.log(error);
|
|
880
|
+
// });
|
|
871
881
|
}
|
|
872
882
|
onChangeEvent(optValue, afFilter) {
|
|
873
883
|
let jsonComp = this.configuration.component;
|