@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
|
@@ -583,7 +583,7 @@ class UCSearchComponent {
|
|
|
583
583
|
postJSON(url, criteria = null) {
|
|
584
584
|
return this.http.post(url, criteria);
|
|
585
585
|
}
|
|
586
|
-
searchClick() {
|
|
586
|
+
searchClick(IsExportExcel = false) {
|
|
587
587
|
let filtered = this.configuration.component.filter((item, i, arr) => arr.findIndex((x) => (x.name === item.name)) === i);
|
|
588
588
|
for (let i = 0; i < filtered.length; i++) {
|
|
589
589
|
if (filtered[i].type == "numeric") {
|
|
@@ -599,7 +599,10 @@ class UCSearchComponent {
|
|
|
599
599
|
};
|
|
600
600
|
}
|
|
601
601
|
this.pageNow = 1;
|
|
602
|
-
|
|
602
|
+
let rowPerPage = this.pageSize;
|
|
603
|
+
if (IsExportExcel)
|
|
604
|
+
rowPerPage = 9999;
|
|
605
|
+
this.search(this.apiUrl, this.pageNow, rowPerPage, order, this.arrCrit, IsExportExcel);
|
|
603
606
|
}
|
|
604
607
|
async reset() {
|
|
605
608
|
this.searchForm.resetForm({
|
|
@@ -607,7 +610,7 @@ class UCSearchComponent {
|
|
|
607
610
|
});
|
|
608
611
|
await this.initiateForm();
|
|
609
612
|
}
|
|
610
|
-
search(apiUrl, pageNo, rowPerPage, orderBy, addCrit = new Array()) {
|
|
613
|
+
search(apiUrl, pageNo, rowPerPage, orderBy, addCrit = new Array(), IsExportExcel = false) {
|
|
611
614
|
let request = new RequestCriteriaObj();
|
|
612
615
|
let arrCrit = new Array();
|
|
613
616
|
let IsQueryIn = false;
|
|
@@ -776,6 +779,11 @@ class UCSearchComponent {
|
|
|
776
779
|
request.integrationObj = this.searchInput.integrationObj;
|
|
777
780
|
}
|
|
778
781
|
this.http.post(apiUrl, request).subscribe((response) => {
|
|
782
|
+
if (IsExportExcel) {
|
|
783
|
+
this.ExcelData = response["Data"];
|
|
784
|
+
this.excelService.exportAsExcelFile(this.ExcelData, 'sample');
|
|
785
|
+
return;
|
|
786
|
+
}
|
|
779
787
|
let qryPaging = {
|
|
780
788
|
response: response,
|
|
781
789
|
pageNow: pageNo
|
|
@@ -843,24 +851,26 @@ class UCSearchComponent {
|
|
|
843
851
|
element.target.value = parseFloat(element.target.value.toString().replace(/,/g, ''));
|
|
844
852
|
}
|
|
845
853
|
exportAsXLSX() {
|
|
846
|
-
|
|
847
|
-
request
|
|
848
|
-
request.
|
|
849
|
-
request.
|
|
850
|
-
request.
|
|
851
|
-
request.
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
else {
|
|
856
|
-
|
|
857
|
-
}
|
|
858
|
-
this.http.post(this.apiUrl, request).subscribe(
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
854
|
+
this.searchClick(true);
|
|
855
|
+
// let request = new RequestCriteriaObj();
|
|
856
|
+
// request.pageNo = 1;
|
|
857
|
+
// request.rowPerPage = 9999;
|
|
858
|
+
// request.orderBy = null;
|
|
859
|
+
// request.criteria = [];
|
|
860
|
+
// request.queryString = this.configuration.querystring;
|
|
861
|
+
// if (!this.searchInput.isJoinExAPI) {
|
|
862
|
+
// request.integrationObj = null;
|
|
863
|
+
// } else {
|
|
864
|
+
// request.integrationObj = this.searchInput.integrationObj;
|
|
865
|
+
// }
|
|
866
|
+
// this.http.post(this.apiUrl, request).subscribe(
|
|
867
|
+
// response => {
|
|
868
|
+
// this.ExcelData = response["Data"];
|
|
869
|
+
// this.excelService.exportAsExcelFile(this.ExcelData, 'sample');
|
|
870
|
+
// },
|
|
871
|
+
// (error) => {
|
|
872
|
+
// console.log(error);
|
|
873
|
+
// });
|
|
864
874
|
}
|
|
865
875
|
onChangeEvent(optValue, afFilter) {
|
|
866
876
|
let jsonComp = this.configuration.component;
|