cloud-web-corejs-haier 1.0.35 → 1.0.36
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/package.json
CHANGED
|
@@ -562,7 +562,7 @@ function getGrid(that, tableRef) {
|
|
|
562
562
|
num = 1;
|
|
563
563
|
loopToDo(0, num);
|
|
564
564
|
},
|
|
565
|
-
createExcelFile(loading) {
|
|
565
|
+
createExcelFile(loading,options) {
|
|
566
566
|
let url1 = this.CURRENT_PREFIX + '/excel/createExcelTemplate';
|
|
567
567
|
let datas = this.getHeadTitleJson();
|
|
568
568
|
return this.$http({
|
|
@@ -573,7 +573,8 @@ function getGrid(that, tableRef) {
|
|
|
573
573
|
},
|
|
574
574
|
data: datas,
|
|
575
575
|
modal: loading || false,
|
|
576
|
-
isLoading: loading
|
|
576
|
+
isLoading: loading,
|
|
577
|
+
...options
|
|
577
578
|
});
|
|
578
579
|
},
|
|
579
580
|
/*getExportTitleJson() {
|
|
@@ -672,7 +673,7 @@ function getGrid(that, tableRef) {
|
|
|
672
673
|
}
|
|
673
674
|
return titleArr;
|
|
674
675
|
},
|
|
675
|
-
addExcelData(opts, loading) {
|
|
676
|
+
addExcelData(opts, loading,options) {
|
|
676
677
|
let target = opts.target;
|
|
677
678
|
let pageNumber = opts.pageNumber || 1;
|
|
678
679
|
let callback = opts.callback;
|
|
@@ -689,16 +690,18 @@ function getGrid(that, tableRef) {
|
|
|
689
690
|
},
|
|
690
691
|
data: datas,
|
|
691
692
|
modal: loading || false,
|
|
692
|
-
isLoading: loading || false
|
|
693
|
+
isLoading: loading || false,
|
|
694
|
+
...options
|
|
693
695
|
});
|
|
694
696
|
},
|
|
695
|
-
mergeExcel(startPage, endPage, loading) {
|
|
697
|
+
mergeExcel(startPage, endPage, loading, options) {
|
|
696
698
|
let url1 = this.CURRENT_PREFIX + "/excel/mergeExcel?uuid=" + this.uuid + "&ippaaapp=" + this.ippaaapp;
|
|
697
699
|
return this.$http({
|
|
698
700
|
url: url1 + "&startPage=" + startPage + "&endPage=" + endPage,
|
|
699
701
|
method: "post",
|
|
700
702
|
modal: loading || false,
|
|
701
|
-
isLoading: loading || false
|
|
703
|
+
isLoading: loading || false,
|
|
704
|
+
...options
|
|
702
705
|
})
|
|
703
706
|
},
|
|
704
707
|
createCountTimer() {
|
|
@@ -852,7 +855,7 @@ function getGrid(that, tableRef) {
|
|
|
852
855
|
|
|
853
856
|
downLoadFile2();
|
|
854
857
|
},
|
|
855
|
-
startProcess2(datas) {
|
|
858
|
+
async startProcess2(datas) {
|
|
856
859
|
this.tableTarget = getGrid(this.option.vue, this.option.targetRef);
|
|
857
860
|
let that = this;
|
|
858
861
|
let options = this.option;
|
|
@@ -873,47 +876,61 @@ function getGrid(that, tableRef) {
|
|
|
873
876
|
return;
|
|
874
877
|
}
|
|
875
878
|
this.CURRENT_PREFIX = options.prefix;
|
|
879
|
+
let flag1 = false;
|
|
880
|
+
let flag2 = false;
|
|
881
|
+
let flag3 = false;
|
|
876
882
|
|
|
877
|
-
let handleData = function () {
|
|
883
|
+
let handleData = async function () {
|
|
878
884
|
let total = datas.length;
|
|
879
|
-
that.addExcelData({
|
|
885
|
+
await that.addExcelData({
|
|
880
886
|
rows: datas,
|
|
881
887
|
pageNumber: 1,
|
|
882
|
-
}, true
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
dataMap["fileSize"] = fileSize;
|
|
897
|
-
that.exportAll(dataMap);
|
|
898
|
-
}
|
|
899
|
-
})
|
|
900
|
-
}, 0)
|
|
888
|
+
}, true, {
|
|
889
|
+
callback: (resultMsg2)=>{
|
|
890
|
+
if (resultMsg2.type == "success") {
|
|
891
|
+
flag2 = true;
|
|
892
|
+
}
|
|
893
|
+
},
|
|
894
|
+
})
|
|
895
|
+
if(flag2){
|
|
896
|
+
let fileInfo = null
|
|
897
|
+
await that.mergeExcel(1, 1, true,{
|
|
898
|
+
callback: (resultMsg3)=>{
|
|
899
|
+
if (resultMsg3.type == "success") {
|
|
900
|
+
flag3 = true;
|
|
901
|
+
fileInfo = resultMsg3.objx;
|
|
901
902
|
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
})
|
|
906
|
+
if(flag3){
|
|
907
|
+
let fileName = fileInfo.fileName;
|
|
908
|
+
let fileSize = fileInfo.fileSize;
|
|
909
|
+
|
|
910
|
+
let dataMap = {};
|
|
911
|
+
dataMap["startPage"] = 1;
|
|
912
|
+
dataMap["endPage"] = 1;
|
|
913
|
+
dataMap["title"] = title;
|
|
914
|
+
dataMap["uuid"] = fileName;
|
|
915
|
+
dataMap["fileSize"] = fileSize;
|
|
916
|
+
setTimeout(() => {
|
|
917
|
+
that.exportAll(dataMap);
|
|
918
|
+
},200);
|
|
902
919
|
}
|
|
903
|
-
}
|
|
920
|
+
}
|
|
904
921
|
}
|
|
905
|
-
that.createExcelFile(true
|
|
922
|
+
await that.createExcelFile(true, {callback: (resultMsg)=>{
|
|
906
923
|
if (resultMsg.type == "success") {
|
|
907
924
|
let aObj = resultMsg.objx;
|
|
908
925
|
that.uuid = aObj.uuid;
|
|
909
926
|
that.nowDate = aObj.nowDate;
|
|
910
927
|
that.ippaaapp = aObj.ippaaapp;
|
|
911
|
-
|
|
912
|
-
handleData();
|
|
913
|
-
}, 0)
|
|
914
|
-
|
|
928
|
+
flag1 = true;
|
|
915
929
|
}
|
|
916
|
-
})
|
|
930
|
+
}})
|
|
931
|
+
if(flag1){
|
|
932
|
+
handleData();
|
|
933
|
+
}
|
|
917
934
|
},
|
|
918
935
|
closeExportFieldDialog() {
|
|
919
936
|
this.dialogClose2();
|
|
@@ -595,7 +595,7 @@ export default {
|
|
|
595
595
|
storageType: "user",
|
|
596
596
|
data: () => {
|
|
597
597
|
this.handleData();
|
|
598
|
-
return this.
|
|
598
|
+
return this.getReqFormData();
|
|
599
599
|
},
|
|
600
600
|
chooseConfirm: (tempStorageData) => {
|
|
601
601
|
this.user = tempStorageData;
|
|
@@ -658,6 +658,22 @@ export default {
|
|
|
658
658
|
this.showExtendedProperties = true;
|
|
659
659
|
}
|
|
660
660
|
},
|
|
661
|
+
getReqFormData() {
|
|
662
|
+
let userCompanyInfoDTOs = this.user.userCompanyInfoDTOs.map((item) => {
|
|
663
|
+
return {
|
|
664
|
+
...item,
|
|
665
|
+
saleOrgGridOption: null,
|
|
666
|
+
roleGridOption: null,
|
|
667
|
+
saleOrgData: null,
|
|
668
|
+
roleData: null,
|
|
669
|
+
};
|
|
670
|
+
});
|
|
671
|
+
let formData = {
|
|
672
|
+
...this.user,
|
|
673
|
+
userCompanyInfoDTOs,
|
|
674
|
+
};
|
|
675
|
+
return formData;
|
|
676
|
+
},
|
|
661
677
|
saveData() {
|
|
662
678
|
let companyCode = this.companyInfo.companyCode;
|
|
663
679
|
this.handleData();
|
|
@@ -680,20 +696,7 @@ export default {
|
|
|
680
696
|
if (valid) {
|
|
681
697
|
this.$baseConfirm(this.$t1("您确定要保存吗?")).then(() => {
|
|
682
698
|
var url = USER_PREFIX + (this.isEdit ? "/user/update" : "/user/save");
|
|
683
|
-
let
|
|
684
|
-
return {
|
|
685
|
-
...item,
|
|
686
|
-
saleOrgGridOption: null,
|
|
687
|
-
roleGridOption: null,
|
|
688
|
-
saleOrgData: null,
|
|
689
|
-
roleData: null,
|
|
690
|
-
};
|
|
691
|
-
});
|
|
692
|
-
let formData = {
|
|
693
|
-
...this.user,
|
|
694
|
-
userCompanyInfoDTOs,
|
|
695
|
-
};
|
|
696
|
-
|
|
699
|
+
let formData = this.getReqFormData();
|
|
697
700
|
this.$http({
|
|
698
701
|
url: url,
|
|
699
702
|
method: `post`,
|