Browse Source

导出的excel文件格式都改为xlsx

seyason 2 years ago
parent
commit
1017905554

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/awayOffice/awayOffice.vue

@@ -968,7 +968,7 @@ export default {
                 if(res.code == 'ok'){
                     var filePath = res.data;
                     const a = document.createElement('a'); // 创建a标签
-                    a.setAttribute('download', this.$t('tripStatistics')+'.xls');// download属性
+                    a.setAttribute('download', this.$t('tripStatistics')+'.xlsx');// download属性
                     a.setAttribute('href', filePath);// href链接
                     a.click(); //自执行点击事件
                     a.remove();

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/contract/index.vue

@@ -486,7 +486,7 @@ export default {
         if(res.code == 'ok'){
           let filePath = res.data;
           const a = document.createElement('a'); // 创建a标签
-          a.setAttribute('download', this.$t('he-tong-dao-chu') + '.xls');// download属性
+          a.setAttribute('download', this.$t('he-tong-dao-chu') + '.xlsx');// download属性
           a.setAttribute('href', filePath);// href链接
           a.click(); //自执行点击事件
           a.remove();

+ 5 - 5
fhKeeper/formulahousekeeper/timesheet/src/views/project/cost.vue

@@ -349,7 +349,7 @@
                     param = {startDate:this.exportParam.dateRange[0], endDate: this.exportParam.dateRange[1],stateKey: 1};
                  }
                  var url = "/project/exportTimeCost";
-                 var fileName = this.$t('projectmanhourcoststatistics')+ '.xls';
+                 var fileName = this.$t('projectmanhourcoststatistics')+ '.xlsx';
                  if(this.radio == this.$t('other.project')){
                     if (this.exportParam.userIds != null && this.exportParam.userIds.length > 0) {
                          var ids = '';
@@ -361,7 +361,7 @@
                  }
                  if (this.radio == this.$t('ren-yuan') ) {
                     //  console.log(this.exportParam.userIds);
-                     fileName = this.$t('labortimecoststatistics')+ '.xls';
+                     fileName = this.$t('labortimecoststatistics')+ '.xlsx';
                      url = '/department/exportUserStatistic';
                      if (this.exportParam.userIds != null && this.exportParam.userIds.length > 0) {
                          var ids = '';
@@ -372,7 +372,7 @@
                      }
                  } 
                 if(this.radio == this.$t('projectclassification')){
-                    fileName = this.$t('projectclassificationlaborosttatistics')+ '.xls';
+                    fileName = this.$t('projectclassificationlaborosttatistics')+ '.xlsx';
                     url = '/project/exportTimeCostByCategory'
                     if(this.exportParam.projectCategoryId){
                         param.projectCategoryId = this.exportParam.projectCategoryId
@@ -386,7 +386,7 @@
                      }
                 }
                 if(this.radio == this.$t('lable.department')){
-                    fileName = this.$t('departmenthourscoststatistics')+ '.xls'
+                    fileName = this.$t('departmenthourscoststatistics')+ '.xlsx'
                     url = '/department/exportDeptStatistic'
                 }
                 
@@ -411,7 +411,7 @@
                 } 
                 if(this.theCustomListFlg) {
                     url = '/project/exportTimeCostByUserCustom'
-                    fileName = this.radio + this.$t('statistical') + '.xls'
+                    fileName = this.radio + this.$t('statistical') + '.xlsx'
                     // param.subCustomName = this.customName
                     param.customId = this.theCustomListId
                     param.fieldName = this.theCustomListPlant

+ 1 - 14
fhKeeper/formulahousekeeper/timesheet/src/views/project/custom_data.vue

@@ -194,20 +194,7 @@
                     param = {startDate:this.exportParam.dateRange[0], endDate: this.exportParam.dateRange[1]};
                  }
                  var url = "/project/exportCustomDataSum";
-                 var fileName = this.user.timeType.customDataName + this.$t('statistical')+'.xls';
-                //  if (this.radio == '人员' ) {
-                //      console.log(this.exportParam.userIds);
-                //      fileName = '人员工时成本统计.xls';
-                //      url = '/department/exportUserStatistic';
-                //      if (this.exportParam.userIds != null && this.exportParam.userIds.length > 0) {
-                //          var ids = '';
-                //         this.exportParam.userIds.forEach(u=>{
-                //             ids += u+',';
-                //         })
-                //         param.userIds = ids;
-                //      }
-                //  } 
-                
+                 var fileName = this.user.timeType.customDataName + this.$t('statistical')+'.xlsx';
                 if (this.exportParam.projectId != null) {
                     param.projectId = this.exportParam.projectId;
                 }

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/project/finance.vue

@@ -736,7 +736,7 @@ import { error } from 'dingtalk-jsapi';
                 },res =>{
                     this.isUploading = false;
                     if(res.code == 'ok') {
-                        this.downloadByA({name:this.exportMonth+this.$t('financialdata') + '.xls', url: res.data});
+                        this.downloadByA({name:this.exportMonth+this.$t('financialdata') + '.xlsx', url: res.data});
                     }
                 },error => {
                     this.$message({

+ 2 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue

@@ -2308,7 +2308,7 @@ a {
                     if (res.code == "ok") {
                         var filePath = res.data;
                         const a = document.createElement('a'); // 创建a标签
-                        a.setAttribute('download', this.$t('projectexport') + '.xls');// download属性
+                        a.setAttribute('download', this.$t('projectexport') + '.xlsx');// download属性
                         a.setAttribute('href', filePath);// href链接
                         a.click(); //自执行点击事件
                         a.remove();
@@ -2329,7 +2329,7 @@ a {
                     if (res.code == "ok") {
                         var filePath = res.data;
                         const a = document.createElement('a'); // 创建a标签
-                        a.setAttribute('download', this.$t('projecttaskgroupexport') + '.xls');// download属性
+                        a.setAttribute('download', this.$t('projecttaskgroupexport') + '.xlsx');// download属性
                         a.setAttribute('href', filePath);// href链接
                         a.click(); //自执行点击事件
                         a.remove();

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/project/project_gantt.vue

@@ -271,7 +271,7 @@ export default {
                     if (res.code == "ok") {
                         let filePath = res.data;
                         const a = document.createElement('a'); // 创建a标签
-                        a.setAttribute('download', this.$t('zi-yuan-xu-qiu-dao-chu')+'.xls');// download属性
+                        a.setAttribute('download', this.$t('zi-yuan-xu-qiu-dao-chu')+'.xlsx');// download属性
                         a.setAttribute('href', filePath);// href链接
                         a.click(); //自执行点击事件
                         a.remove();

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/provider/provider.vue

@@ -252,7 +252,7 @@
                         var filePath = res.data;
                         let arr = this.$t('gong-ying-shang-dao-chu')
                         const a = document.createElement('a'); // 创建a标签
-                        a.setAttribute('download', this.$t('gong-ying-shang-dao-chu') + '.xls');// download属性
+                        a.setAttribute('download', this.$t('gong-ying-shang-dao-chu') + '.xlsx');// download属性
                         a.setAttribute('href', filePath);// href链接
                         a.click(); //自执行点击事件
                         a.remove();

+ 2 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -2746,7 +2746,7 @@
         (res) => {
           if (res.code == "ok") {
             let url = res.data;
-            this.downloadByA(this.$t('template.Staffdailyworkinghoursstatistics') + '.xls', url);
+            this.downloadByA(this.$t('template.Staffdailyworkinghoursstatistics') + '.xlsx', url);
           }
         },
         (error) => {
@@ -2769,7 +2769,7 @@
         (res) => {
           if (res.code == "ok") {
             let url = res.data;
-            this.downloadByA(this.$t('template.Staffdailyworkinghoursstatistics') + '.xls', url);
+            this.downloadByA(this.$t('template.Staffdailyworkinghoursstatistics') + '.xlsx', url);
           }
         },
         (error) => {